Agentic-Reliability-Framework-API / tests /test_healing_endpoint.py
petter2025's picture
Upload folder using huggingface_hub (#3)
6d20eab
raw
history blame contribute delete
578 Bytes
from fastapi.testclient import TestClient
from app.main import app
client = TestClient(app)
def test_healing_evaluate_endpoint():
payload = {
"event": {
"component": "my-service",
"latency_p99": 450.0,
"error_rate": 0.25,
"service_mesh": "default",
"cpu_util": 0.85,
"memory_util": 0.90
}
}
response = client.post("/api/v1/healing/evaluate", json=payload)
assert response.status_code == 200, f"Expected 200, got {
response.status_code}: {
response.text}"