Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

fix: clear INITIAL_PASSWORD and JWT_SECRET in integration tests

diegosouzapwead269d30dac
diff --git a/tests/integration/_chatPipelineHarness.ts b/tests/integration/_chatPipelineHarness.ts
index da8ca1d13b..93588e3cc3 100644
--- a/tests/integration/_chatPipelineHarness.ts
+++ b/tests/integration/_chatPipelineHarness.ts
@@ -7,8 +7,10 @@ export async function createChatPipelineHarness(prefix) {
process.env.DATA_DIR = testDataDir;
process.env.REQUIRE_API_KEY = "false";
// Disable dashboard auth so direct route handler calls don't get 401
- // (CI postinstall auto-generates DASHBOARD_PASSWORD)
+ // (CI sets JWT_SECRET + INITIAL_PASSWORD, causing isAuthRequired() → true)
process.env.DASHBOARD_PASSWORD = "";
+ process.env.INITIAL_PASSWORD = "";
+ delete process.env.JWT_SECRET;
// FASE-01: API_KEY_SECRET is required for CRC operations (no hardcoded fallback)
if (!process.env.API_KEY_SECRET) {
process.env.API_KEY_SECRET = "test-harness-secret-" + Date.now();
diff --git a/tests/integration/proxy-registry-flow.test.ts b/tests/integration/proxy-registry-flow.test.ts
index 4ee9aa511c..48510dea5d 100644
--- a/tests/integration/proxy-registry-flow.test.ts
+++ b/tests/integration/proxy-registry-flow.test.ts
@@ -7,8 +7,10 @@ import path from "node:path";
const TEST_DATA_DIR = fs.mkdtempSync(path.join(os.tmpdir(), "omniroute-proxy-registry-flow-"));
process.env.DATA_DIR = TEST_DATA_DIR;
// Disable dashboard auth for direct route handler calls in CI
-// (postinstall auto-generates DASHBOARD_PASSWORD, causing 401 on management routes)
+// (CI sets JWT_SECRET + INITIAL_PASSWORD, causing isAuthRequired() → true)
process.env.DASHBOARD_PASSWORD = "";
+process.env.INITIAL_PASSWORD = "";
+delete process.env.JWT_SECRET;
const core = await import("../../src/lib/db/core.ts");
const providersDb = await import("../../src/lib/db/providers.ts");