fix(workspace): isolate maintenance authentication surface

This commit is contained in:
2026-08-25 18:37:39 +02:00
parent db375298d0
commit fd878b8c3e
3 changed files with 19 additions and 4 deletions
+11
View File
@@ -97,6 +97,17 @@ test("loadConfig allows none and mock only outside production when auth.yaml is
.toThrow("production requires auth.yaml or AUTH_MODE=upstream");
});
test("workspace maintenance loads production configuration without an authentication surface", () => {
expect(loadConfig(
{ NODE_ENV: "production", THOTH_PUBLIC_EXPOSURE: "true" },
{ surface: "workspace-maintenance" },
)).toMatchObject({
authMode: "none",
authentication: undefined,
publicExposure: false,
});
});
test("local Compose profiles explicitly select the development auth environment", () => {
for (const profile of ["../../deploy/compose.local.yaml", "../../docker-compose.dev.yml"]) {
expect(readFileSync(new URL(profile, import.meta.url), "utf8")).toMatch(/NODE_ENV:\s*development/);