fix: add getList with records wrapper + correct options format from browser capture
This commit is contained in:
@@ -15,18 +15,21 @@ func TestServerList(t *testing.T) {
|
||||
}
|
||||
resp := map[string]any{
|
||||
"code": 0,
|
||||
"data": []map[string]any{
|
||||
{
|
||||
"id": 12001,
|
||||
"name": "web-server",
|
||||
"status": "running",
|
||||
"ip": "1.2.3.4",
|
||||
"vcpu": 2,
|
||||
"memory": 4096,
|
||||
"disk": 50,
|
||||
"os": "Ubuntu 22.04",
|
||||
"expire_date": "2026-08-15",
|
||||
"data": map[string]any{
|
||||
"records": []map[string]any{
|
||||
{
|
||||
"id": 12001,
|
||||
"name": "web-server",
|
||||
"status": "running",
|
||||
"ip": "1.2.3.4",
|
||||
"vcpu": 2,
|
||||
"memory": 4096,
|
||||
"disk": 50,
|
||||
"os": "Ubuntu 22.04",
|
||||
"expire_date": "2026-08-15",
|
||||
},
|
||||
},
|
||||
"totalRecords": 1,
|
||||
},
|
||||
}
|
||||
json.NewEncoder(w).Encode(resp)
|
||||
|
||||
Reference in New Issue
Block a user