Summary
desktop/api_server.py has an alerts endpoint (\GET /api/v1/alerts, line ~444) that returns recent proactive alerts, but ests/test_api_server.py has no coverage for it. The TestMetrics, TestHealth, and other classes cover other endpoints.
Goal
Add a TestAlerts class in ests/test_api_server.py covering:
- \GET /api/v1/alerts\ returns 200 with an alerts list
- Requires auth (401 without a valid token)
- Works when the alerts store is empty (returns empty list, not an error)
Tasks
- Inspect the alert handler to confirm response shape (data/status/error envelope)
- Add the new test class following the existing patterns (app fixture, headers fixture)
- Run the suite: \python -m pytest tests/test_api_server.py --cov=desktop --cov-fail-under=40\
Acceptance criteria
Labels
good first issue, help wanted
Summary
desktop/api_server.py has an alerts endpoint (\GET /api/v1/alerts, line ~444) that returns recent proactive alerts, but ests/test_api_server.py has no coverage for it. The TestMetrics, TestHealth, and other classes cover other endpoints.
Goal
Add a TestAlerts class in ests/test_api_server.py covering:
Tasks
Acceptance criteria
Labels
good first issue, help wanted