mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-10 04:36:40 +00:00
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
22 lines
860 B
JavaScript
22 lines
860 B
JavaScript
// /healthz/ready on the Gitea domain returns a non-5xx response.
|
|
//
|
|
// This is the endpoint the Blackbox Exporter probes to determine whether
|
|
// Gitea is up. A 200 or 401 means the backend is reachable; 502/503 means
|
|
// the container is down. This test verifies the healthz endpoint is wired
|
|
// correctly.
|
|
|
|
const { test, expect } = require("@playwright/test");
|
|
const { resolveTimeout } = require("./timeouts");
|
|
|
|
exports.register = function (shared) {
|
|
test("healthz/ready endpoint returns non-5xx when gitea is running", async ({ request }) => {
|
|
const response = await request.get(shared.healthzReadyUrl(), { timeout: resolveTimeout(30_000) });
|
|
|
|
expect(
|
|
response.status(),
|
|
`/healthz/ready returned ${response.status()} — ` +
|
|
"502/503 means the Gitea container is down or nginx cannot reach it.",
|
|
).toBeLessThan(500);
|
|
});
|
|
};
|