@@ -52,7 +52,7 @@ def rig(tmp_path, monkeypatch):
5252 executor .add_node (helper )
5353 spinner = Spinner (executor )
5454 assert wait_for (lambda : all (p .get_subscription_count () > 0 for p in pubs .values ()), 10.0 )
55- yield tmp_path , api , pubs , test , spinner
55+ yield tmp_path , api , pubs , test , spinner , node
5656 spinner .stop ()
5757 helper .destroy_node ()
5858 node .destroy_node ()
@@ -65,7 +65,7 @@ def kinds(api) -> list:
6565
6666
6767def test_a_critical_finding_reaches_the_webhook (rig ):
68- tmp_path , api , pubs , _ , _ = rig
68+ tmp_path , api , pubs , * _ = rig
6969 folder = tmp_path / '20261101' / '090200_bay1'
7070 folder .mkdir (parents = True )
7171 (folder / 'report.json' ).write_text (json .dumps (REPORT ))
@@ -76,9 +76,10 @@ def test_a_critical_finding_reaches_the_webhook(rig):
7676
7777
7878def test_patrols_after_start_and_health_errors (rig ):
79- _ , api , pubs , _ , _ = rig
79+ _ , api , pubs , _ , _ , node = rig
8080 old = PatrolStatus (state = PatrolStatus .DONE , report = '/r/20261031/patrol_090000.json' )
8181 pubs ['patrol' ].publish (old ) # ended before the node started: not announced
82+ assert wait_for (lambda : old .report in node .patrols , 10.0 ) # latched: the next replaces it
8283 new = PatrolStatus (state = PatrolStatus .FAILED , report = '/r/20261101/patrol_090000.json' ,
8384 message = 'lost' , site = 'gi' ) # fmt: skip
8485 pubs ['patrol' ].publish (new )
@@ -90,7 +91,7 @@ def test_patrols_after_start_and_health_errors(rig):
9091
9192
9293def test_the_test_alert (rig ):
93- _ , api , _ , test , spinner = rig
94+ _ , api , _ , test , spinner , _ = rig
9495 answer = spinner .call (test , Trigger .Request ())
9596 assert answer .success , answer .message
9697 assert wait_for (lambda : 'test' in kinds (api ), 10.0 )
0 commit comments