Test hygiene: empty the flow store between modules, unbind demand on shutdown, poll the hook state in test_flow_ids, count only the watcher under test in the revoked-link test, delete runs.spec's runs
Docs / docs (push) Successful in 1m21s
Playwright Tests / test-playwright (1, 2) (push) Successful in 4m12s
Playwright Tests / test-playwright (2, 2) (push) Successful in 2m25s
pre-commit / pre-commit (push) Successful in 3m46s
Test Backend / test-backend (3.12) (push) Successful in 7m57s
Test Backend / test-backend (3.14) (push) Successful in 7m31s
Compose Smoke Test / test-compose (push) Successful in 31s
Playwright Tests / merge-reports (push) Successful in 1m20s

This commit is contained in:
2026-11-05 08:03:56 +01:00
parent c6ac7f80a9
commit 4c15f4abe1
5 changed files with 34 additions and 5 deletions
+9 -2
View File
@@ -20,6 +20,7 @@ from fluksio.flow.dashboards import DashboardDef, WidgetDef
from fluksio.flow.store import ISSUED_ID
from fluksio.flow.tombstones import names_of
from fluksio.models import FlowTombstone, Run
from tests.api.routes.test_rename import _until
FLOWS = f"{settings.API_V1_STR}/flows"
DASHBOARDS = f"{settings.API_V1_STR}/dashboards"
@@ -180,8 +181,14 @@ def test_a_flow_runs_under_its_key_and_is_reached_by_its_id(
hooked = client.post(f"/hooks/{flow_id}/tick", json={"tick": 7.0})
assert hooked.status_code == 200, hooked.text
assert client.post(f"/hooks/{key}/tick", json={"tick": 8.0}).status_code == 404
state = client.get(f"{FLOWS}/{flow_id}/state", headers=superuser_token_headers)
assert state.json()["values"][f"{key}.tick"]["value"] == 7.0
def values() -> dict[str, Any]:
state = client.get(f"{FLOWS}/{flow_id}/state", headers=superuser_token_headers)
return dict(state.json()["values"])
# Once the cascade it queued has run.
_until(lambda: f"{key}.tick" in values())
assert values()[f"{key}.tick"]["value"] == 7.0
paused = client.post(f"{FLOWS}/{flow_id}/pause", headers=superuser_token_headers)
assert paused.status_code == 200