This commit is contained in:
valenti
2026-09-08 07:21:34 -04:00
commit a4b224da8e
169 changed files with 27483 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
"""Smoke tests for health endpoints — do NOT require live Mongo."""
from __future__ import annotations
import pytest
pytestmark = pytest.mark.anyio
async def test_root_endpoint_returns_metadata(asf_client):
resp = await asf_client.get("/")
assert resp.status_code == 200
body = resp.json()
assert body["name"] == "asf-core"
assert "docs" in body
assert body["health"] == "/api/v1/health"
async def test_health_liveness_ok(asf_client):
resp = await asf_client.get("/api/v1/health")
assert resp.status_code == 200
body = resp.json()
assert body["status"] == "ok"
assert body["service"] == "asf-core"
assert "uptime_seconds" in body
assert body["environment"] in {"development", "test", "production"}