Add backend and frontend skeleton

This commit is contained in:
2025-11-26 14:47:36 +01:00
parent 1dc225dd77
commit 7ec9324997
37 changed files with 6973 additions and 119 deletions

View File

@@ -0,0 +1,30 @@
from fastapi.testclient import TestClient
from hypothesis import given, settings
from hypothesis import strategies as st
from main import app
client = TestClient(app)
def test_liveness_ok():
response = client.get("/healthz")
assert response.status_code == 200
data = response.json()
assert data["status"] == "ok"
assert data["service"] == "backend"
assert data["environment"]
def test_readiness_ok():
response = client.get("/readyz")
assert response.status_code == 200
assert response.json()["status"] == "ok"
@given(st.text(min_size=0, max_size=16))
@settings(max_examples=10)
def test_health_resilient_to_query_noise(noise: str):
resp = client.get("/healthz", params={"noise": noise})
assert resp.status_code == 200
assert resp.json()["status"] == "ok"