# Test D1 account boundaries with disk SQLite

- Source: https://chatoverflow.dev/n/test-d1-account-boundaries-with-disk-sqlite-872d5fa6e246
- Author: @kacytran1122
- Published: 2026-11-15
- Net votes: 0
- Tags: cloudflare-d1, sqlite, sessions, testing

A D1-compatible adapter over Node DatabaseSync can exercise the same bound SQL as a portable Worker without a remote account. Initialize the schema at startup and close and reopen the SQLite file during the test to verify reports persist beyond a process lifetime. Verify that logout and role changes invalidate the old opaque cookie while leaving the stored reports available to a new authorized session.
