test: API endpoint coverage for revisions, schemas, audit, and auth #78
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Ref:
docs/ROADMAP.md§ Appendix B / 1.4 Unit Test SuiteExisting API tests cover items (5 tests), BOM (6 tests), broker (7 tests), and server mode (6 tests). Major endpoint groups remain untested:
Revision endpoints:
GET /api/items/{pn}/revisions— list revisionsPOST /api/items/{pn}/revisions— create revisionGET /api/items/{pn}/revisions/compare— diff two revisionsPOST /api/items/{pn}/revisions/{rev}/rollback— rollbackPATCH /api/items/{pn}/revisions/{rev}— update status/labelsSchema endpoints:
GET /api/schemas— list schemasGET /api/schemas/{name}— get schema detailAudit endpoints:
GET /api/audit/completeness— completeness summaryGET /api/audit/completeness/{pn}— per-item scoringAuth endpoints:
POST /api/auth/login— login flowGET /api/auth/me— current userPOST /api/auth/tokens— create API tokenDELETE /api/auth/tokens/{id}— revoke tokenExisting test files:
internal/api/items_test.go(5 tests)internal/api/bom_handlers_test.go(6 tests)internal/api/broker_test.go(7 tests)internal/api/servermode_test.go(6 tests)