Alexander Whitestone
|
ed1270969a
|
test: add unit tests for health.py route module
Tests / lint (pull_request) Failing after 3s
Tests / test (pull_request) Has been skipped
Adds 41 unit tests covering:
- Pydantic models (DependencyStatus, SovereigntyReport, HealthStatus)
- Helper functions (_calculate_overall_score, _generate_recommendations)
- Ollama sync probe (_check_ollama_sync) with mock HTTP responses
- Async Ollama check with TTL cache behavior (hit, miss, expiry)
- Legacy bool wrapper (check_ollama)
- SQLite and Lightning dependency checks
- All five endpoints (/health, /health/status, /health/sovereignty,
/health/components, /health/snapshot)
- Graceful degradation when Ollama is down or snapshot module fails
Fixes #945
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-03-22 18:57:36 -04:00 |
|