diff --git a/tests/unit/app/endpoints/test_health.py b/tests/unit/app/endpoints/test_health.py new file mode 100644 index 00000000..e73cb3e6 --- /dev/null +++ b/tests/unit/app/endpoints/test_health.py @@ -0,0 +1,16 @@ +from app.endpoints.health import readiness_probe_get_method, liveness_probe_get_method + + +def test_readiness_probe(mocker): + """Test the readiness endpoint handler.""" + response = readiness_probe_get_method() + assert response is not None + assert response.ready is True + assert response.reason == "service is ready" + + +def test_liveness_probe(mocker): + """Test the liveness endpoint handler.""" + response = liveness_probe_get_method() + assert response is not None + assert response.alive is True