Prepare State Hub retirement baseline
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s
Build and Publish Multi-Context Image / build-and-push (push) Successful in 1m0s

This commit is contained in:
tegwick 2026-08-09 16:19:53 +02:00
parent 2217bdd9f5
commit 5927591be8
46 changed files with 32583 additions and 62 deletions

View file

@ -48,17 +48,30 @@ def _fake_get(path: str, params: dict | None = None):
if path == "/repos":
return [{"id": "repo-1", "slug": "demo-repo", "domain_slug": "infotech"}]
if path == "/repo-goals":
return [{"id": "goal-1", "title": "Ship it", "description": "d", "priority": "high"}]
return [{
"id": "goal-1",
"repo_id": "repo-1",
"repo_slug": "demo-repo",
"title": "Ship it",
"description": "d",
"priority": "high",
}]
if path == "/capability-catalog/":
return []
return []
def test_get_domain_summary_goal_guidance_is_workplan_first(monkeypatch) -> None:
monkeypatch.setattr(server, "_get", lambda path, params=None: _fake_get(path, params))
calls = []
monkeypatch.setattr(
server,
"_get",
lambda path, params=None: calls.append((path, params)) or _fake_get(path, params),
)
payload = json.loads(server.get_domain_summary("infotech"))
assert "workplans" in payload
assert payload["workstreams"] == payload["workplans"]
action = payload["goal_guidance"]["needs_workplan"][0]["action"]
assert "workplan" in action.lower()
assert "workstream is linked" not in action.lower()
assert "workstream is linked" not in action.lower()
assert [path for path, _ in calls].count("/repo-goals") == 1