File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change 77
88from warnet .k8s import delete_pod
99from warnet .process import run_command
10- from warnet .scenarios import _active as scenarios_active
10+ from warnet .status import _get_active_scenarios as scenarios_active
1111
1212
1313class ScenariosTest (TestBase ):
@@ -36,7 +36,7 @@ def scenario_running(self, scenario_name: str):
3636 """Check that we are only running a single scenario of the correct name"""
3737 active = scenarios_active ()
3838 assert len (active ) == 1
39- return scenario_name in active [0 ]["commander " ]
39+ return scenario_name in active [0 ]["name " ]
4040
4141 def run_and_check_scenario_from_file (self ):
4242 scenario_file = "test/data/scenario_p2p_interface.py"
@@ -80,7 +80,7 @@ def stop_scenario(self):
8080 running = scenarios_active ()
8181 assert len (running ) == 1 , f"Expected one running scenario, got { len (running )} "
8282 assert running [0 ]["status" ] == "running" , "Scenario should be running"
83- delete_pod (running [0 ]["commander " ])
83+ delete_pod (running [0 ]["name " ])
8484 self .wait_for_predicate (self .check_scenario_stopped )
8585
8686 def check_scenario_stopped (self ):
Original file line number Diff line number Diff line change 1414from warnet .control import get_active_scenarios
1515from warnet .k8s import get_pod_exit_status
1616from warnet .network import _connected as network_connected
17- from warnet .network import _status as network_status
17+ from warnet .status import _get_tank_status as network_status
1818
1919
2020class TestBase :
@@ -112,11 +112,9 @@ def check_status():
112112 if len (tanks ) == 0 :
113113 return True
114114 for tank in tanks :
115- for service in ["bitcoin" , "lightning" , "circuitbreaker" ]:
116- status = tank .get (f"{ service } _status" )
117- if status :
118- stats ["total" ] += 1
119- stats [status ] = stats .get (status , 0 ) + 1
115+ status = tank ["status" ]
116+ stats ["total" ] += 1
117+ stats [status ] = stats .get (status , 0 ) + 1
120118 self .log .info (f"Waiting for all tanks to reach '{ target } ': { stats } " )
121119 return target in stats and stats [target ] == stats ["total" ]
122120
You can’t perform that action at this time.
0 commit comments