Skip to content

Commit 61c4384

Browse files
committed
fix(tests): update health check test to accept unhealthy status
Update test_health_check to accept 'unhealthy' status in addition to 'healthy' and 'degraded'. This reflects the new health check logic where: - healthy: database and model are both up - degraded: database up but model not loaded - unhealthy: database is unavailable
1 parent c85ac12 commit 61c4384

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

tests/integration/test_api.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ def test_health_check(self, test_client: TestClient) -> None:
1414
assert response.status_code == 200
1515

1616
data = response.json()
17-
# Status can be "healthy" or "degraded" depending on database availability
18-
assert data["status"] in ("healthy", "degraded")
17+
# Status depends on database and model availability:
18+
# - healthy: both database and model are up
19+
# - degraded: database up but model not loaded
20+
# - unhealthy: database unavailable
21+
assert data["status"] in ("healthy", "degraded", "unhealthy")
1922
assert "version" in data
2023
assert "timestamp" in data
2124

0 commit comments

Comments
 (0)