Gates / frontend (push) Successful in 1m32s
Gates / test (push) Successful in 1m54s
Gates / package (push) Successful in 5m28s
Gates / container (push) Successful in 14s
Gates / test-aarch64 (push) Failing after 3h10m0s
CI / gates (push) Failing after 3h11m55s
20 lines
684 B
TypeScript
20 lines
684 B
TypeScript
/**
|
|
* A healthy `GET /api/health` body, for tests that need protection to be a
|
|
* settled fact rather than the subject under test. Overrides are per condition,
|
|
* so a test names only the one it is about.
|
|
*/
|
|
|
|
import type { Health } from "./types";
|
|
|
|
export function health(overrides: Partial<Health> = {}): Health {
|
|
return {
|
|
status: "ok",
|
|
protection: { state: "active", until: null },
|
|
upstreams: { state: "ok", available: 2, total: 2 },
|
|
query_history: { state: "recording", dropped_total: 0, last_drop_s: null },
|
|
diagnostics: { state: "recording", active_warnings: 0, active_errors: 0 },
|
|
disk: { state: "ok", free_bytes: 40 * 1024 * 1024 * 1024 },
|
|
...overrides,
|
|
};
|
|
}
|