docs: document service health checks
This commit is contained in:
parent
16e54b63f2
commit
324e1cab4e
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user