fix: update test files to work with the new features

This commit is contained in:
2025-04-25 22:16:51 +02:00
parent 81dcd9c7cc
commit 100cad5acd
3 changed files with 17 additions and 14 deletions

View File

@@ -30,7 +30,8 @@ func TestUpdateRecordFullAPILifecycle(t *testing.T) {
case r.Method == http.MethodGet && r.URL.Path == "/records":
// Query records by zone_id
resp := map[string]interface{}{
"records": []map[string]string{{"id": recID, "name": domain, "value": "0.0.0.0", "type": "A"}},
// Return the relative subdomain name ("test") as the API does, not the full domain
"records": []map[string]string{{"id": recID, "name": "test", "value": "0.0.0.0", "type": "A"}},
}
json.NewEncoder(w).Encode(resp)
case r.Method == http.MethodPut && r.URL.Path == "/records/"+recID: