77
88from warnet .control import stop_scenario
99from warnet .process import run_command
10- from warnet .status import _get_active_scenarios as scenarios_active
10+ from warnet .status import _get_deployed_scenarios as scenarios_deployed
1111
1212
1313class ScenariosTest (TestBase ):
@@ -32,22 +32,22 @@ def setup_network(self):
3232
3333 def scenario_running (self , scenario_name : str ):
3434 """Check that we are only running a single scenario of the correct name"""
35- active = scenarios_active ()
36- assert len (active ) == 1
37- return scenario_name in active [0 ]["name" ]
35+ deployed = scenarios_deployed ()
36+ assert len (deployed ) == 1
37+ return scenario_name in deployed [0 ]["name" ]
3838
3939 def check_scenario_stopped (self ):
40- running = scenarios_active ()
40+ running = scenarios_deployed ()
4141 self .log .debug (f"Checking if scenario stopped. Running scenarios: { len (running )} " )
4242 return len (running ) == 0
4343
4444 def check_scenario_clean_exit (self ):
45- active = scenarios_active ()
46- return all (scenario ["status" ] == "succeeded" for scenario in active )
45+ deployed = scenarios_deployed ()
46+ return all (scenario ["status" ] == "succeeded" for scenario in deployed )
4747
4848 def stop_scenario (self ):
4949 self .log .info ("Stopping running scenario" )
50- running = scenarios_active ()
50+ running = scenarios_deployed ()
5151 assert len (running ) == 1 , f"Expected one running scenario, got { len (running )} "
5252 assert running [0 ]["status" ] == "running" , "Scenario should be running"
5353 stop_scenario (running [0 ]["name" ])
@@ -58,8 +58,8 @@ def check_blocks(self, target_blocks, start: int = 0):
5858 self .log .debug (f"Current block count: { count } , target: { start + target_blocks } " )
5959
6060 try :
61- active = scenarios_active ()
62- commander = active [0 ]["commander" ]
61+ deployed = scenarios_deployed ()
62+ commander = deployed [0 ]["commander" ]
6363 command = f"kubectl logs { commander } "
6464 print ("\n commander output:" )
6565 print (run_command (command ))
0 commit comments