Add monitor API tests (B8) #2

Merged
hzhang merged 1 commits from feat/monitor-tests into master 2026-03-20 09:22:26 +00:00
Contributor
  • 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).

- 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).
hzhang added 1 commit 2026-03-20 09:22:21 +00:00
- 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).
hzhang merged commit 63e3352854 into master 2026-03-20 09:22:26 +00:00
hzhang deleted branch feat/monitor-tests 2026-03-20 09:22:26 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: zhi/HarborForge.Backend.Test#2