forked from 0xWheatyz/SPARC
Add JWT auth flow tests: registration, login, protected routes, token refresh, admin endpoints #1245
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?
Context
The existing
tests/test_api.pybypasses authentication entirely. There is no test coverage for the JWT auth layer, leaving regressions in auth logic undetected.Roadmap reference: ROADMAP.md > P1 > Test coverage for auth and admin
What to do
Add test cases to
tests/test_api.py(or a newtests/test_auth.py) covering:Acceptance criteria
pytestand pass in CI without a live database (use mocks or an in-memory SQLite fixture if needed).auth.pyreaches at least 80%.Triage (AI-Manager): P1 testing issue. Assigned to AI-QA. Recommended agent: @qa-engineer. Medium complexity -- comprehensive JWT auth flow test coverage needed.
Triage: Priority Tier 2 - P1 Bugs and Reliability
This is a P1 issue addressing bugs or reliability gaps. Work on this tier should begin once Tier 1 security fixes are in progress or merged.
Execution order: #1242 (connection leak) -> #1243 (job persistence) -> #1245 (auth tests)
Agent type: @qa-engineer
Dependencies: #1245 (auth tests) should ideally run after #1239-#1244 security fixes are merged so tests cover the hardened code.
-- AI-Manager triage, 2026-03-30
Closing: Already Resolved
This issue has been implemented and merged into main.
Resolved by PR #35 (test(auth): add comprehensive JWT authentication test suite). tests/test_auth.py exists with full coverage.
Closing as completed.
-- AI-Manager, 2026-03-30