-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Goal
Verify that all API endpoints have equivalent unit and integration test coverage. Both test suites validate the same behavior; integration tests verify real database state, unit tests use mocks. No coverage gaps.
Requirements
Functional
- Audit all existing unit tests (Issue 01: FastAPI scaffold #1 to Issue 22: OpenAPI Spec and Postman Collection #22) and integration tests.
- Identify and document coverage gaps.
- Add missing unit tests (mocked DB) for all 13+ endpoints.
- Add missing integration tests (real DB + RLS) for all 13+ endpoints.
- Ensure all error codes (4xx, 5xx) have dedicated test cases.
- Verify RLS enforcement in integration tests (cross-vendor isolation).
Technical
- Coverage Matrix: All endpoints must have unit + integration + error case tests.
- Endpoints:
POST /auth/signup,POST /auth/login,POST /auth/refresh,POST /licenses,GET /licenses,GET /licenses/{id},PATCH /licenses/{id},POST /licenses/{id}/revoke,POST /license-activation/validate,POST /licenses/{id}/activate/session,POST /licenses/heartbeat,GET /audit/export.csv,GET /health. - Minimum: ~45 total test cases across all endpoints.
Acceptance Criteria
- All 13+ endpoints have both unit and integration tests.
- All error codes (4xx, 5xx) have dedicated test cases.
- RLS isolation verified in integration tests (Vendor A cannot see Vendor B's data).
- Coverage report shows >90%.
- All tests pass in CI.
Dependencies
- Blocked by: Issue 01: FastAPI scaffold #1 to Issue 22: OpenAPI Spec and Postman Collection #22 (all endpoints must exist).
- Blocks: Nothing (final quality gate).
Reactions are currently unavailable