Implement Monlet MVP stack and UI updates

This commit is contained in:
Stanislav Rossovskii
2026-05-27 10:01:59 +04:00
parent dcea096327
commit edc51e9c59
145 changed files with 15618 additions and 248 deletions

View File

@@ -0,0 +1,18 @@
import pytest
from ._helpers import make_event, make_heartbeat
@pytest.mark.asyncio
async def test_metrics_endpoint(app_client, auth_headers):
await app_client.post("/api/v1/heartbeat", json=make_heartbeat(), headers=auth_headers)
ev = make_event(status="critical", exit_code=2)
await app_client.post(
"/api/v1/events", json={"agent_id": "agent-1", "events": [ev]}, headers=auth_headers
)
r = await app_client.get("/metrics")
assert r.status_code == 200
body = r.text
assert "monlet_server_heartbeats_total" in body
assert "monlet_server_events_total" in body
assert "monlet_server_incidents_opened_total" in body