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.
19 lines
573 B
TypeScript
19 lines
573 B
TypeScript
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,
|
|
},
|
|
})
|