fix: PascalCase JSON fields + code:200 success + Unix timestamp ExpDate
This commit is contained in:
@@ -16,9 +16,9 @@ func TestServerList(t *testing.T) {
|
||||
resp := map[string]any{
|
||||
"code": 0,
|
||||
"data": map[string]any{
|
||||
"records": []map[string]any{
|
||||
"Records": []map[string]any{
|
||||
{
|
||||
"id": 12001,
|
||||
"ID": 12001,
|
||||
"name": "web-server",
|
||||
"status": "running",
|
||||
"ip": "1.2.3.4",
|
||||
@@ -26,10 +26,10 @@ func TestServerList(t *testing.T) {
|
||||
"memory": 4096,
|
||||
"disk": 50,
|
||||
"os": "Ubuntu 22.04",
|
||||
"expire_date": "2026-08-15",
|
||||
"ExpDate": 1756656000,
|
||||
},
|
||||
},
|
||||
"totalRecords": 1,
|
||||
"TotalRecords": 1,
|
||||
},
|
||||
}
|
||||
json.NewEncoder(w).Encode(resp)
|
||||
|
||||
Reference in New Issue
Block a user