mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-26 17:12:27 +03:00
⭐5 — initCredentialHealthCheck() agora retorna se o sweep está armado; boot loga "disabled" quando OMNIROUTE_DISABLE_CREDENTIAL_HEALTH_CHECK está setado, em vez de sempre "started". 3 testes verdes, comportamento do sweep inalterado. Fecha #11016.
15 lines
565 B
TypeScript
15 lines
565 B
TypeScript
import test from "node:test";
|
|
import assert from "node:assert/strict";
|
|
|
|
// #11016: OMNIROUTE_DISABLE_CREDENTIAL_HEALTH_CHECK must be observable.
|
|
// Set the kill-switch BEFORE importing the scheduler — the module auto-inits
|
|
// on first import.
|
|
process.env.OMNIROUTE_DISABLE_CREDENTIAL_HEALTH_CHECK = "true";
|
|
|
|
test("initCredentialHealthCheck returns false when the disable env is set", async () => {
|
|
const { initCredentialHealthCheck } = await import(
|
|
"../../src/lib/credentialHealth/scheduler.ts"
|
|
);
|
|
assert.equal(initCredentialHealthCheck(), false);
|
|
});
|