File size: 598 Bytes
939c0c0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | """
Unit tests for Health Check & Deep Diagnostic Endpoints.
"""
from __future__ import annotations
import pytest
from httpx import AsyncClient
@pytest.mark.asyncio
async def test_health_diag_endpoint(client: AsyncClient):
"""Test deep health diagnostic endpoint returns status for DB, Qdrant, and Cache."""
response = await client.get("/health/diag")
assert response.status_code == 200
data = response.json()
assert "database" in data
assert "qdrant" in data
assert "cache" in data
assert "overall" in data
assert data["overall"] in ["healthy", "degraded"]
|