fix(tests): update scheduler-status shape pins for platform_cooldowns
61ce1ce added platform_cooldowns to scheduler_status(), and two pinned
key-set assertions tied to the old shape failed in CI. Updated:
- tests/test_api_sources.py::test_schedule_status_shape — direct
/api/sources/schedule-status response.
- tests/test_api_system_activity.py::test_summary_returns_rollup_shape
— nested under body["scheduler"] in the summary endpoint.
[[feedback-plan-grep-pinned-tests]] miss — should have grepped tests/
for `last_tick_at` / `auto_sources` before adding the new key.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -39,7 +39,10 @@ async def test_schedule_status_shape(client):
|
||||
resp = await client.get("/api/sources/schedule-status")
|
||||
assert resp.status_code == 200
|
||||
body = await resp.get_json()
|
||||
assert set(body) == {"last_tick_at", "next_due_at", "due_now", "auto_sources"}
|
||||
assert set(body) == {
|
||||
"last_tick_at", "next_due_at", "due_now", "auto_sources",
|
||||
"platform_cooldowns",
|
||||
}
|
||||
assert isinstance(body["due_now"], int)
|
||||
assert isinstance(body["auto_sources"], int)
|
||||
|
||||
|
||||
@@ -60,7 +60,10 @@ async def test_summary_returns_rollup_shape(client, monkeypatch):
|
||||
assert body["queued_total"] == 3 # only ml has a non-zero depth
|
||||
assert isinstance(body["running"], int)
|
||||
assert isinstance(body["failing"], int)
|
||||
assert set(body["scheduler"]) == {"last_tick_at", "next_due_at", "due_now", "auto_sources"}
|
||||
assert set(body["scheduler"]) == {
|
||||
"last_tick_at", "next_due_at", "due_now", "auto_sources",
|
||||
"platform_cooldowns",
|
||||
}
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
||||
Reference in New Issue
Block a user