Skip to content

Commit cb4beb2

Browse files
authored
Add integration tests for control plane (workerd runtime) (#73)
* feat: add integration tests for control plane using workerd runtime (#73) Adds 14 integration tests that run inside the real workerd runtime via @cloudflare/vitest-pool-workers, validating Worker boot, routing, HMAC auth, D1 database operations, and Durable Objects with SQLite storage. Tests run offline with no cloud credentials — miniflare provides local D1 (SQLite), KV, and DO implementations. isolatedStorage is disabled due to workers-sdk#11031 (SQLite WAL files break the storage snapshot assertions). D1 isolation is achieved via beforeEach cleanup instead. * fix: lint and prettier formatting issues * refactor: extract shared D1 cleanup helper for integration tests Cleans all D1 tables (sessions, repo_metadata, repo_secrets) in beforeEach instead of just sessions, preventing potential cross-test state leaks as the test suite grows.
1 parent 3718b7d commit cb4beb2

File tree

14 files changed

+1222
-7
lines changed

14 files changed

+1222
-7
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,12 @@ jobs:
130130
- name: Run control-plane tests
131131
run: npm test -w @open-inspect/control-plane
132132

133+
- name: Install workerd runtime dependency
134+
run: sudo apt-get update && sudo apt-get install -y libc++1
135+
136+
- name: Run control-plane integration tests
137+
run: npm run test:integration -w @open-inspect/control-plane
138+
133139
- name: Run web tests
134140
run: npm test -w @open-inspect/web
135141

0 commit comments

Comments
 (0)