test(supabase): isolated Supabase stack and real-stack suite for M1

scripts/db-sandbox.sh (pnpm db:sandbox): DEV images on an own network, loopback ports distinct from DEV, no volume, secrets generated outside Git; fresh and upgrade modes through the CLI's migration up, test db and gen types with --db-url. packages/supabase/tests/sandbox: M1 sign-up and confirmation, reads and refusals per role, residual GoTrue admin path, correlation cap, concurrent sessions.
This commit is contained in:
bchanot committed 2026-10-25 20:57:09 +01:00
1 parent 6bf69787cb
commit 08abe42c48
6 files changed
+791 -1

No files matched your search

@@ -0,0 +1,18 @@
import { defineConfig } from 'vitest/config'
/**
* Real-stack suite on the throwaway stack of `pnpm db:sandbox` (tests/sandbox):
* HTTP through GoTrue and PostgREST, concurrent SQL sessions. Run only through
* `pnpm db:sandbox test`, which provides the endpoints and the generated keys;
* kept out of the default `test:run` include on purpose.
*/
export default defineConfig({
test: {
environment: 'node',
globals: true,
include: ['tests/sandbox/**/*.sandbox.ts'],
fileParallelism: false,
testTimeout: 120_000,
hookTimeout: 120_000,
},
})