Add e2e coverage for the backup API: no end-to-end spec exercises backup, restore, or status
Labels / Complexity: testing · Medium Complexity — Medium
Problem
The test/e2e/ suite has no spec for the backup API. The backup/restore/status endpoints manage database snapshots — the data-loss boundary — and only unit specs cover fragments of the service (#86). With #42 (ephemeral archives) pending, there is no HTTP-level guard on backup behavior.
Why this is architecturally hard
- Restore is destructive. An e2e restore test must restore into an isolated test database (the
test/database harness) so it cannot touch real data.
- Scheduling makes e2e tricky. Tests should drive the API (create backup, list, status) rather than waiting on cron; the schedule itself stays unit-covered.
Acceptance criteria
- An e2e spec drives backup creation, listing, status, and restore against the test database.
- The spec runs in CI with the existing e2e harness without touching non-test data.
Out of scope
The durability fix (#42); unit coverage (#86).
Getting started
test/database/ — the isolated test DB harness
src/backup/backup.controller.ts — the endpoints
Commands: npm run test:e2e (or the repo's e2e script from package.json).
Good first files to read: test/database/prisma-test-helpers.ts, src/backup/backup.controller.ts.
Add e2e coverage for the backup API: no end-to-end spec exercises backup, restore, or status
Labels / Complexity: testing · Medium Complexity — Medium
Problem
The
test/e2e/suite has no spec for the backup API. The backup/restore/status endpoints manage database snapshots — the data-loss boundary — and only unit specs cover fragments of the service (#86). With #42 (ephemeral archives) pending, there is no HTTP-level guard on backup behavior.Why this is architecturally hard
test/databaseharness) so it cannot touch real data.Acceptance criteria
Out of scope
The durability fix (#42); unit coverage (#86).
Getting started
test/database/— the isolated test DB harnesssrc/backup/backup.controller.ts— the endpointsCommands:
npm run test:e2e(or the repo's e2e script frompackage.json).Good first files to read:
test/database/prisma-test-helpers.ts,src/backup/backup.controller.ts.