fix(health): engine-kollen ärlig (not_configured när URL saknas) + EVIDENCE-docs mot Coolify-verkligheten
CI (SIAX Cloud) / integration (push) Skipped
CI (SIAX Cloud) / sonar (push) Skipped
masterplan-lock / check (push) Successful in 7s
CI (SIAX Cloud) / sonar (pull_request) Skipped
CI (SIAX Cloud) / security (push) Successful in 17s
Security Scan (SIAX Cloud) / security (push) Successful in 18s
Security Scan (SIAX Cloud) / security (pull_request) Successful in 28s
masterplan-lock / check (pull_request) Successful in 28s
CI (SIAX Cloud) / security (pull_request) Successful in 29s
CI (SIAX Cloud) / integration (pull_request) Successful in 37s
CI (SIAX Cloud) / quality (push) Successful in 1m8s
CI (SIAX Cloud) / quality (pull_request) Successful in 1m0s

This commit is contained in:
2026-09-30 10:08:25 +02:00
parent 24912b735f
commit 0386d82c49
2 changed files with 79 additions and 17 deletions
+15
View File
@@ -114,6 +114,21 @@ describe("checkEngine", () => {
});
expect(result.status).toBe("error");
});
it("REGRESSION: reports error (with the abort message in detail) when the probe times out via AbortController -- the exact 2026-09-30 prod symptom", async () => {
// Mätt i prod 2026-09-30: ENGINE_URL satt i Coolify-env mot en
// oprovisionerad host -> AbortController:n nbröt efter 2 s och
// /api/health rapporterade {"engine":"error",
// "detail":{"engine":"This operation was aborted"}}. Kollen ska
// vara ÄRLIG här: URL:en ÄR satt, så detta är error -- inte
// not_configured och aldrig ok.
process.env.ENGINE_URL = "http://0pt-engine:8000";
const result = await checkEngine(async () => {
throw new DOMException("This operation was aborted", "AbortError");
});
expect(result.status).toBe("error");
expect(result.detail).toContain("aborted");
});
});
describe("checkStripe", () => {