Maintenance: ListBlockErrors est un GET (verifie dans l'OpenAPI v2 de Garage), le mock refuse le POST

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
cedricandClaude Sonnet 5.5 committed 2026-11-21 12:53:48 +01:00
1 parent 8de5262c12
commit 17b98b6cf3
2 files changed
+5 -1

No files matched your search

+4
View File
@@ -315,6 +315,10 @@ func handle(token string) http.HandlerFunc {
map[string]any{"id": 3, "name": "object sync", "state": map[string]any{"throttled": map[string]any{"durationSecs": 5}}, "errors": 1, "consecutiveErrors": 1, "lastError": map[string]any{"message": "timeout", "secsAgo": 90}},
}}, "error": map[string]any{}})
case "ListBlockErrors":
if r.Method != http.MethodGet { // comme le vrai Garage : GET uniquement
gerr(w, 400, "Unknown API endpoint: "+r.Method+" /v2/"+op)
return
}
j(w, 200, map[string]any{"success": map[string]any{nodeID: []any{}}, "error": map[string]any{}})
case "LaunchRepairOperation", "CreateMetadataSnapshot", "RetryBlockResync":
j(w, 200, map[string]any{"success": map[string]any{nodeID: nil}, "error": map[string]any{}})