|
|
ed21b73a43
|
Add monitor API tests (B8)
- test_monitor.py: 12 test cases covering:
- API key generation (success, 404, admin-only)
- heartbeat-v2 endpoint (valid key, invalid key, missing key)
- API key revocation and validation
- ServerState data persistence (agents_json, cpu_pct, etc.)
- Disabled server rejection
- conftest.py: import app.models.monitor for test database setup
All tests passing (pytest -v).
|
2026-03-19 19:39:15 +00:00 |
|
|
|
5f6a3dffe4
|
test(P14.1): add comprehensive backend API test suite
Add 134 tests as independent test project:
- test_auth.py (5): Login, JWT, protected endpoints
- test_users.py (8): User CRUD, permissions
- test_projects.py (8): Project CRUD, ownership
- test_milestones.py (7): Milestone CRUD, filtering
- test_tasks.py (8): Task CRUD, filtering
- test_comments.py (5): Comment CRUD, permissions
- test_roles.py (9): Role/permission management
- test_milestone_actions.py (17): Milestone state machine
- test_task_transitions.py (34): Task state machine
- test_propose.py (19): Propose CRUD, lifecycle
- test_misc.py (14): Notifications, activity, API keys, dashboard
Setup:
- conftest.py: SQLite in-memory DB, fixtures
- requirements.txt: Dependencies
- pyproject.toml: Pytest config
- README.md: Documentation
|
2026-03-19 12:43:44 +00:00 |
|