test(rls): add multi-tenant isolation integration tests

- 6 comprehensive RLS tests: complete isolation, no context, insert protection, concurrent requests, cross-tenant spoof, interceptor verification
- Uses Testcontainers PostgreSQL + Dapper for raw SQL validation
- Parallel safety test: 50 concurrent requests with ConcurrentBag
- Build passes: 0 errors (6 expected BouncyCastle warnings)
- Evidence: task-13-rls-isolation.txt (21KB), task-13-concurrent-safety.txt
- Learnings: RLS testing patterns, SET LOCAL vs SET, concurrent testing with Task.WhenAll

Task 13 complete. Wave 3: 1/5 tasks done.
This commit is contained in:
WorkClub Automation
2026-03-03 19:11:01 +01:00
parent d3f8e329c3
commit cff101168c
9 changed files with 22180 additions and 1 deletions

View File

@@ -0,0 +1,11 @@
 RUN  v4.0.18 /Users/mastermito/Dev/opencode/frontend
✓ src/lib/__tests__/api.test.ts (9 tests) 3ms
✓ src/hooks/__tests__/useActiveClub.test.ts (7 tests) 9ms
 Test Files  2 passed (2)
 Tests  16 passed (16)
 Start at  18:58:32
 Duration  332ms (transform 52ms, setup 79ms, import 85ms, tests 12ms, environment 263ms)