What needs to be done
Add end-to-end tests for the core milestone CRUD endpoints in server.py.
Currently there is no test suite. We need at least:
POST /api/northstar/{proj}/milestones — create stone, verify default status=queued
PATCH /api/northstar/{proj}/milestones/{mid} — status update
DELETE /api/northstar/{proj}/milestones/{mid} — verify removal
Use pytest + httpx.AsyncClient (already in the dependency graph via FastAPI test client).
Why it matters
Every refactor is currently manual-tested. A basic test suite will catch regressions before they reach production (where this runs live 24/7).
Acceptance criteria
Estimated effort
2-4 hours for someone comfortable with FastAPI + pytest.
Helpful context
- Main server:
hub/hub/server.py
- Endpoint prefix:
/api/northstar/{proj}/milestones
- See
ARCHITECTURE.md for data model overview
- Existing stub dir:
hub/tests/ (currently empty)
What needs to be done
Add end-to-end tests for the core milestone CRUD endpoints in
server.py.Currently there is no test suite. We need at least:
POST /api/northstar/{proj}/milestones— create stone, verify defaultstatus=queuedPATCH /api/northstar/{proj}/milestones/{mid}— status updateDELETE /api/northstar/{proj}/milestones/{mid}— verify removalUse
pytest+httpx.AsyncClient(already in the dependency graph via FastAPI test client).Why it matters
Every refactor is currently manual-tested. A basic test suite will catch regressions before they reach production (where this runs live 24/7).
Acceptance criteria
hub/tests/test_milestones.pyexists and passespython -m pytest hub/tests/ns-events.db)Estimated effort
2-4 hours for someone comfortable with FastAPI + pytest.
Helpful context
hub/hub/server.py/api/northstar/{proj}/milestonesARCHITECTURE.mdfor data model overviewhub/tests/(currently empty)