Harden production workflows and agent admission
This commit is contained in:
@@ -10,7 +10,7 @@ EXAMPLES = os.path.join(os.path.dirname(__file__), "..", "..", "examples")
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_examples_payload(app_client, auth_headers, session):
|
||||
async def test_examples_payload(app_client, auth_headers, ui_auth_headers, session):
|
||||
with open(os.path.join(EXAMPLES, "heartbeat.json")) as f:
|
||||
hb = json.load(f)
|
||||
with open(os.path.join(EXAMPLES, "event-batch.json")) as f:
|
||||
@@ -18,6 +18,8 @@ async def test_examples_payload(app_client, auth_headers, session):
|
||||
|
||||
r = await app_client.post("/api/v1/heartbeat", json=hb, headers=auth_headers)
|
||||
assert r.status_code == 202
|
||||
r = await app_client.post(f"/api/v1/agents/{hb['agent_id']}/accept", headers=ui_auth_headers)
|
||||
assert r.status_code == 200
|
||||
|
||||
r = await app_client.post("/api/v1/events", json=batch, headers=auth_headers)
|
||||
assert r.status_code == 202
|
||||
|
||||
Reference in New Issue
Block a user