Harden production workflows and agent admission
This commit is contained in:
@@ -200,7 +200,7 @@ async def _seed_incident_and_outbox(
|
||||
event_type="firing",
|
||||
state="pending",
|
||||
attempts=0,
|
||||
next_attempt_at=datetime.now(UTC),
|
||||
next_attempt_at=datetime.now(UTC) - timedelta(seconds=1),
|
||||
payload=_payload(),
|
||||
)
|
||||
session.add(row)
|
||||
@@ -386,7 +386,7 @@ async def test_telegram_redacts_secret_in_incident_key():
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_fanout_creates_row_per_enabled_notifier(
|
||||
app_client, auth_headers, session, monkeypatch
|
||||
app_client, ui_auth_headers, session, monkeypatch
|
||||
):
|
||||
# Enable telegram (token+chat_id satisfied) and webhook in addition to debug.
|
||||
os.environ["MONLET_NOTIFIER_TELEGRAM_ENABLED"] = "true"
|
||||
@@ -398,9 +398,9 @@ async def test_fanout_creates_row_per_enabled_notifier(
|
||||
|
||||
reset_settings_cache()
|
||||
try:
|
||||
from tests._helpers import make_event, make_heartbeat
|
||||
from tests._helpers import make_event, register_agent
|
||||
|
||||
await app_client.post("/api/v1/heartbeat", json=make_heartbeat(), headers=auth_headers)
|
||||
auth_headers = await register_agent(app_client, ui_auth_headers)
|
||||
ev = make_event(status="critical", exit_code=2)
|
||||
r = await app_client.post(
|
||||
"/api/v1/events",
|
||||
|
||||
Reference in New Issue
Block a user