Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,14 @@


def test_health(cuoptproc): # noqa
# Normal health check
response = client.get("/cuopt/health")
assert response.status_code == 200

# health check with root path
response = client.get("/")
assert response.status_code == 200


def test_readiness(cuoptproc): # noqa
response = client.get("/v2/health/ready")
Expand Down
5 changes: 5 additions & 0 deletions python/cuopt_server/cuopt_server/webserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@ async def request_exception_handler(request, exc):
return exception_handler(exc)


@app.get(
"/",
description="To ping if server is running",
responses=HealthResponse,
)
@app.get(
"/cuopt/health",
description="To ping if server is running",
Expand Down