packages/supabase/tests/e2e/avatar-flow.e2e.ts (pnpm e2e:avatar through scripts/avatar-e2e.sh: worker container on the Supabase network, 5 s sweep, no quarantine grace; a fresh account per run): clean upload and owner-only download (Bob, anon, quarantine key, direct final-key write refused), replacement purged after the grace (queue clock shifted through psql), late bytes through a still-valid signed upload URL swept, hostile and corrupted uploads rejected with closed codes, removal with the purge queue drained. Worker: the Storage API answers a missing object with HTTP 400 and statusCode 404; normalised to 404 so a purge of a never-written key is acked. docker-compose.yml: service worker under the worker profile (read-only, cap_drop ALL, no-new-privileges, 512m, 1 cpu, 64 pids, .env.worker, external Supabase network). docs/development/STORAGE.md: the implementation contract.
18 lines
479 B
TypeScript
18 lines
479 B
TypeScript
import { defineConfig } from 'vitest/config'
|
|
|
|
/**
|
|
* Real-stack end-to-end suite (tests/e2e/*.e2e.ts): needs the local Supabase
|
|
* stack and the worker container (scripts/avatar-e2e.sh starts both sides).
|
|
* Kept out of the default `test:run` include on purpose.
|
|
*/
|
|
export default defineConfig({
|
|
test: {
|
|
environment: 'node',
|
|
globals: true,
|
|
include: ['tests/e2e/**/*.e2e.ts'],
|
|
fileParallelism: false,
|
|
testTimeout: 120_000,
|
|
hookTimeout: 120_000,
|
|
},
|
|
})
|