fix(test): include oauth_inits in postgres teardown table list #261
No reviewers
Labels
No labels
area:auth
area:ci
area:db
area:infra
area:native
area:pwa
area:service
epic
feature
foundation
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
james/carol!261
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-postgres-tests-oauth-inits"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
"oauth_inits"to theKYSELY_TABLESdrop list inapps/api/tests/db/_engines.ts.Test (postgres)job failing withrelation "oauth_inits" already existson every PR since #215 merged.Why
The per-suite Postgres setup drops every table in
KYSELY_TABLES(including thekysely_migration*bookkeeping tables) before re-running the migrator from scratch — that's how the shared CI Postgres database stays clean between test files. SQLite uses:memory:so each suite gets a brand-new DB and the list doesn't matter there.Migration
012_oauth_inits(added in #215) created anoauth_initstable but did not extendKYSELY_TABLES. So on the second-and-later suite,kysely_migration*is wiped, the migrator thinks no migrations have run, replays 001→013, and migration 012 trips over the leftoveroauth_initstable:One-line fix.
Test plan
postgres:16— full vitest run failed with the same error and the same migration-012 stack.TEST_POSTGRES_URL=postgres://… pnpm -F @carol/api test— 748/748 pass, 50/50 suites pass.Test (postgres)is green.Note on the
~10m02srunner-provisioning hangsIn the last 20 failing
Test (postgres)tasks, exactly one (run #561) shows the runner-provisioning timeout pattern — eight jobs all dying at 10m02s duringSet up job. That's a separate Forgejo Actions infrastructure hang, not in scope here.Closes #259.
📊 Test coverage
Patch coverage: no testable lines changed.
Overall (
app/,lib/,db/, excluding UI per ADR-0019):Soft thresholds per ADR-0019. Coverage is informational and does not block merge.