Skip to content

Commit 42a739b

Browse files
committed
lint
1 parent 5200052 commit 42a739b

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

src/warnet/control.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
console = Console()
2929

30+
3031
@click.command()
3132
@click.argument("scenario_name", required=False)
3233
def stop(scenario_name):

test/data/scenario_buggy_failure.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
except Exception:
88
from resources.scenarios.commander import Commander
99

10+
1011
class Failure(Commander):
1112
def set_test_params(self):
1213
self.num_nodes = 1

test/scenarios_test.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,8 @@ def two_pass_one_fail():
102102
deployed = scenarios_deployed()
103103
if len([s for s in deployed if s["status"] == "succeeded"]) != 2:
104104
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+
108107
self.wait_for_predicate(two_pass_one_fail)
109108
table = self.warnet("status")
110109
assert "Active Scenarios: 0" in table

test/test_base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
from warnet import SRC_DIR
1313
from warnet.k8s import get_pod_exit_status
1414
from warnet.network import _connected as network_connected
15-
from warnet.status import _get_tank_status as network_status
1615
from warnet.status import _get_deployed_scenarios as scenarios_deployed
16+
from warnet.status import _get_tank_status as network_status
1717

1818

1919
class TestBase:
@@ -130,8 +130,8 @@ def check_scenarios():
130130
if len(scns) == 0:
131131
return True
132132
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}")
135135
if exit_status != 0:
136136
return False
137137
return True

0 commit comments

Comments
 (0)