# 09: Testing Infrastructure **What to build:** Pytest tests run against separate test database. Tests cover auth endpoints, health endpoint, and object storage workflows. **Blocked by:** 02 (Database Schema & Migrations), 03 (FastAPI Application Foundation) **Status:** ready-for-agent - [ ] Pytest fixtures for `TestClient` configured - [ ] Test database (`hapi_test`) created and cleaned between test runs - [ ] Auth endpoint tests (token generation, validation, revocation) - [ ] Health endpoint tests (DB status, storage status) - [ ] Object storage workflow tests (upload → Linode → NextCloud → download) - [ ] Tests run in CI (staging and production deployments) - [ ] Test coverage reported (optional: thresholds for lines/functions)