File tree Expand file tree Collapse file tree 4 files changed +7
-6
lines changed Expand file tree Collapse file tree 4 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 27
27
28
28
console = Console ()
29
29
30
+
30
31
@click .command ()
31
32
@click .argument ("scenario_name" , required = False )
32
33
def stop (scenario_name ):
Original file line number Diff line number Diff line change 7
7
except Exception :
8
8
from resources .scenarios .commander import Commander
9
9
10
+
10
11
class Failure (Commander ):
11
12
def set_test_params (self ):
12
13
self .num_nodes = 1
Original file line number Diff line number Diff line change @@ -102,9 +102,8 @@ def two_pass_one_fail():
102
102
deployed = scenarios_deployed ()
103
103
if len ([s for s in deployed if s ["status" ] == "succeeded" ]) != 2 :
104
104
return False
105
- if len ([s for s in deployed if s ["status" ] == "failed" ]) != 1 :
106
- return False
107
- return True
105
+ return len ([s for s in deployed if s ["status" ] == "failed" ]) == 1
106
+
108
107
self .wait_for_predicate (two_pass_one_fail )
109
108
table = self .warnet ("status" )
110
109
assert "Active Scenarios: 0" in table
Original file line number Diff line number Diff line change 12
12
from warnet import SRC_DIR
13
13
from warnet .k8s import get_pod_exit_status
14
14
from warnet .network import _connected as network_connected
15
- from warnet .status import _get_tank_status as network_status
16
15
from warnet .status import _get_deployed_scenarios as scenarios_deployed
16
+ from warnet .status import _get_tank_status as network_status
17
17
18
18
19
19
class TestBase :
@@ -130,8 +130,8 @@ def check_scenarios():
130
130
if len (scns ) == 0 :
131
131
return True
132
132
for s in scns :
133
- exit_status = get_pod_exit_status (s )
134
- self .log .debug (f"Scenario { s } exited with code { exit_status } " )
133
+ exit_status = get_pod_exit_status (s [ "name" ] )
134
+ self .log .debug (f"Scenario { s [ 'name' ] } exited with code { exit_status } " )
135
135
if exit_status != 0 :
136
136
return False
137
137
return True
You can’t perform that action at this time.
0 commit comments