Integration tests #14

Closed
opened 2026-03-05 18:45:32 -06:00 by jeremy · 0 comments
Owner

Write integration tests for the API server communicating with a mock node agent.

Tasks

  • Spin up a mock node agent (FastAPI TestClient or actual process) for tests
  • Test full round-trip: dashboard request -> API server -> mock agent -> response
  • Test group bulk action round-trip: POST /api/groups/{id}/start -> node agents
  • Test log streaming round-trip: GET /api/services/{node}/{id}/logs -> agent
  • Test node unreachable scenario: API server returns partial data
  • Run tests against real node agents in staging (optional CI step)

Notes

  • Use pytest-asyncio for async test cases
  • Mock agents can be simple FastAPI apps returning fixture data
  • Document how to run integration tests in CI vs local
Write integration tests for the API server communicating with a mock node agent. ## Tasks - [ ] Spin up a mock node agent (FastAPI TestClient or actual process) for tests - [ ] Test full round-trip: dashboard request -> API server -> mock agent -> response - [ ] Test group bulk action round-trip: POST /api/groups/{id}/start -> node agents - [ ] Test log streaming round-trip: GET /api/services/{node}/{id}/logs -> agent - [ ] Test node unreachable scenario: API server returns partial data - [ ] Run tests against real node agents in staging (optional CI step) ## Notes - Use pytest-asyncio for async test cases - Mock agents can be simple FastAPI apps returning fixture data - Document how to run integration tests in CI vs local
jeremy added this to the v1.0 milestone 2026-03-05 18:45:32 -06:00
jeremy added the testing label 2026-03-05 18:45:32 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jeremy/farm-manager#14