← back to AbramsOS
abramsos: fix test suite — disable app Basic Auth + single-user autologin in test env
c1f40234dbba86a7bdc1fee50bca82790698cffb · 2026-08-25 12:43:27 -0700 · Steve
Commit 8aca6e8 (app-level Basic Auth) intercepted the session-auth/CSRF
smoke tests with 401 before route logic, and .env's SINGLE_USER_AUTOLOGIN
auto-logged-in the owner so the 'auth-gated' tests saw 200 instead of 302.
Both are production/fleet concerns, not what these tests validate. Overriding
APP_BASIC_AUTH=0 + SINGLE_USER_AUTOLOGIN= in the test script restores the
suite to green (110/111 pass, 1 pre-existing pdf-fixture skip). Production
keeps Basic Auth (NODE_ENV=production) + nginx + autologin unchanged.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Files touched
Diff
commit c1f40234dbba86a7bdc1fee50bca82790698cffb
Author: Steve <steve@designerwallcoverings.com>
Date: Tue Aug 25 12:43:27 2026 -0700
abramsos: fix test suite — disable app Basic Auth + single-user autologin in test env
Commit 8aca6e8 (app-level Basic Auth) intercepted the session-auth/CSRF
smoke tests with 401 before route logic, and .env's SINGLE_USER_AUTOLOGIN
auto-logged-in the owner so the 'auth-gated' tests saw 200 instead of 302.
Both are production/fleet concerns, not what these tests validate. Overriding
APP_BASIC_AUTH=0 + SINGLE_USER_AUTOLOGIN= in the test script restores the
suite to green (110/111 pass, 1 pre-existing pdf-fixture skip). Production
keeps Basic Auth (NODE_ENV=production) + nginx + autologin unchanged.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 2612fa6..bd82369 100644
--- a/package.json
+++ b/package.json
@@ -7,7 +7,7 @@
"start": "node server.js",
"dev": "nodemon server.js",
"pretest": "createdb abrams_os_test 2>/dev/null || true; psql -q -d abrams_os_test -f db/schema.sql >/dev/null 2>&1 || true; for m in db/migrations/*.sql; do psql -q -d abrams_os_test -f \"$m\" >/dev/null 2>&1 || true; done; psql -q -d abrams_os_test -f db/seed.sql >/dev/null 2>&1 || true; PG_DATABASE=abrams_os_test node scripts/seed-rights-rules.js >/dev/null 2>&1 || true",
- "test": "PG_DATABASE=abrams_os_test node --test tests/*.test.js",
+ "test": "PG_DATABASE=abrams_os_test APP_BASIC_AUTH=0 SINGLE_USER_AUTOLOGIN= node --test tests/*.test.js",
"migrate": "psql -d abrams_os -f db/schema.sql",
"seed": "psql -d abrams_os -f db/seed.sql"
},
← d5366d1 auto-data-snapshot: 2026-08-19T23:16:54 (1 data files) — bac
·
back to AbramsOS
·
abramsos: make Mode claims watch autonomous via George-corpu 801e623 →