fix(tests): sync 4 tests to current production contracts

- SSH schema: add user + user_password fields (service extended post-test)
- TopologySummary: repo.get_topology() returns model now, not raw dict
- health live: tarpit_watcher added to get_background_tasks(), add to expected set
This commit is contained in:
2026-05-10 06:48:42 -04:00
parent e4626879f6
commit 64610bf96e
4 changed files with 6 additions and 8 deletions

View File

@@ -80,8 +80,7 @@ def test_mutation_request_rejects_unknown_op():
async def test_summary_accepts_repo_topology_row(repo):
plan = generate(_cfg())
tid = await persist(repo, plan)
row = await repo.get_topology(tid)
summary = TopologySummary(**row)
summary = await repo.get_topology(tid)
assert summary.id == tid
assert summary.version == 1
# Defaults surface cleanly on a fresh topology.
@@ -97,8 +96,7 @@ async def test_summary_surfaces_needs_resync_flag(repo):
plan = generate(_cfg())
tid = await persist(repo, plan)
await repo.set_topology_resync(tid, True)
row = await repo.get_topology(tid)
summary = TopologySummary(**row)
summary = await repo.get_topology(tid)
assert summary.needs_resync is True

View File

@@ -88,8 +88,8 @@ async def test_put_then_get(client, auth_token):
# Persisted as JSON string in the topology row.
topo = await _repo.get_topology(tid)
assert isinstance(topo["email_personas"], str)
stored = json.loads(topo["email_personas"])
assert isinstance(topo.email_personas, str)
stored = json.loads(topo.email_personas)
assert {p["email"] for p in stored} == {"a@example.com", "b@example.com"}