mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-10 02:25:56 +00:00
fix(tests): supply valid PBS datastore health fixture
The advanced proposal's complete backend shard exposed a shared PBS fixture that returned an array from the datastore-status endpoint. Supply the healthy datastore observation those node-metric lifecycle tests intend, preventing the live datastore evaluator from fabricating an unrelated connectivity incident. Change-source: pulse-maintainer
This commit is contained in:
@@ -127,6 +127,15 @@ func newPBSHealthTestServer(t *testing.T) *pbsHealthTestServer {
|
||||
"avail": 750,
|
||||
}},
|
||||
})
|
||||
case "/api2/json/admin/datastore/backups/status":
|
||||
_ = json.NewEncoder(w).Encode(map[string]any{
|
||||
"data": map[string]any{
|
||||
"status": "available",
|
||||
"total": 1000,
|
||||
"used": 250,
|
||||
"avail": 750,
|
||||
},
|
||||
})
|
||||
case "/api2/json/admin/datastore/backups/namespace":
|
||||
_ = json.NewEncoder(w).Encode(map[string]any{"data": []any{}})
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user