fix(topology): delete topology_mutations in delete-cascade
delete_topology_cascade manually deletes status_events, edges, deckies and lans but overlooked topology_mutations, so deleting any topology that ever had a mutation enqueued (i.e. edits while active|degraded) failed with an FK IntegrityError. Add the missing DELETE and extend the cascade test to seed a mutation row.
This commit is contained in:
@@ -138,6 +138,7 @@ async def test_cascade_delete_clears_all_children(repo):
|
||||
{"topology_id": t_id, "decky_uuid": d_uuid, "lan_id": lan_id}
|
||||
)
|
||||
await repo.update_topology_status(t_id, "deploying")
|
||||
await repo.enqueue_topology_mutation(t_id, "noop", {"x": 1})
|
||||
|
||||
assert await repo.delete_topology_cascade(t_id) is True
|
||||
assert await repo.get_topology(t_id) is None
|
||||
|
||||
Reference in New Issue
Block a user