diff --git a/README.md b/README.md index fc5cf57..2f65d3a 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,11 @@ Gitea connection directly, request `user`, `repos`, `issues`, and `pull_requests`. Never commit the token or place it in a tracked configuration file. +For service monitoring, GET `/healthz` is a liveness check that confirms the +API process is running and does not contact Gitea. GET `/readyz` is the +readiness check: it validates the configured Gitea credentials and returns +HTTP 503 with an error when Gitea is unavailable or authentication fails. + Run the test suite with: ```bash diff --git a/tests/test_readme.py b/tests/test_readme.py index f5b6914..f0374d1 100644 --- a/tests/test_readme.py +++ b/tests/test_readme.py @@ -23,3 +23,12 @@ def test_readme_documents_a_complete_local_quickstart(): assert "uvicorn src.main:app" in text assert "http://127.0.0.1:8000/api/v1/context" in text assert "uvicorn==" in REQUIREMENTS.read_text() + + +def test_readme_documents_liveness_and_gitea_readiness_checks(): + text = README.read_text() + + assert "`/healthz`" in text + assert "`/readyz`" in text + assert "does not contact Gitea" in text + assert "HTTP 503" in text