Skip to content

Commit aed5a9c

Browse files
committed
Ensures network local is used if forgotten in e2e tests
1 parent 97cd2af commit aed5a9c

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/e2e_tests/utils.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,19 @@ def exec_command(
3131
inputs: list[str] = None,
3232
):
3333
extra_args = extra_args or []
34+
# Ensure if we forget to add `--network ws://127.0.0.1:9945` that it will run still using the local chain
35+
if not any(
36+
(
37+
x in extra_args
38+
for x in (
39+
"--network",
40+
"--chain",
41+
"--subtensor.network",
42+
"--subtensor.chain_endpoint",
43+
)
44+
)
45+
):
46+
extra_args.extend(["--network", "ws://127.0.0.1:9945"])
3447
cli_manager = CLIManager()
3548
# Capture stderr separately from stdout
3649
runner = CliRunner(mix_stderr=False)

0 commit comments

Comments
 (0)