@@ -96,36 +96,3 @@ def __iter__(self):
9696 output = tasks ._collect_multicast_results (units , group , timeout = 0.01 )
9797
9898 assert output == {"unit1" : {"ok" : True }, "unit2" : None }
99-
100-
101- def test_update_app_across_cluster_broadcast_updates_leader_and_workers (
102- monkeypatch : pytest .MonkeyPatch ,
103- ) -> None :
104- calls : list [tuple [str , list [str ]]] = []
105-
106- monkeypatch .setattr (tasks , "check_call" , lambda cmd : calls .append (("check_call" , cmd )))
107- monkeypatch .setattr (tasks , "sleep" , lambda _seconds : None )
108-
109- result = tasks .update_app_across_cluster .call_local ()
110-
111- assert result is True
112- assert calls == [
113- ("check_call" , [tasks .PIO_EXECUTABLE , "update" , "app" , "--defer-web-restart" ]),
114- ("check_call" , [tasks .PIOS_EXECUTABLE , "update" , "-y" ]),
115- ("check_call" , ["sudo" , "systemctl" , "restart" , "pioreactor-web.target" ]),
116- ]
117-
118-
119- def test_update_app_across_cluster_single_unit_only_targets_selected_unit (
120- monkeypatch : pytest .MonkeyPatch ,
121- ) -> None :
122- calls : list [tuple [str , list [str ]]] = []
123-
124- monkeypatch .setattr (tasks , "check_call" , lambda cmd : calls .append (("check_call" , cmd )))
125-
126- result = tasks .update_app_across_cluster .call_local (units = "unit2" )
127-
128- assert result is True
129- assert calls == [
130- ("check_call" , [tasks .PIOS_EXECUTABLE , "update" , "-y" , "--units" , "unit2" ]),
131- ]
0 commit comments