Add web auth, infinite-scroll, agent admission and review fixes across agent/server/web
This commit is contained in:
@@ -23,13 +23,13 @@ async def test_event_accepted_and_state(app_client, ui_auth_headers, session):
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_event_before_heartbeat_is_dropped(app_client, auth_headers, session):
|
||||
async def test_event_before_heartbeat_is_rejected(app_client, auth_headers, session):
|
||||
ev = make_event(status="warning", exit_code=1)
|
||||
r = await app_client.post(
|
||||
"/api/v1/events", json={"agent_id": "agent-replay", "events": [ev]}, headers=auth_headers
|
||||
)
|
||||
assert r.status_code == 202
|
||||
assert r.json() == {"accepted": 0, "deduplicated": 0}
|
||||
assert r.status_code == 403
|
||||
assert r.json()["error"]["code"] == "agent_not_accepted"
|
||||
n = (await session.execute(select(func.count()).select_from(Agent))).scalar_one()
|
||||
assert n == 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user