Skip to content

Commit 7e24c04

Browse files
committed
Added e2e test
1 parent 608a791 commit 7e24c04

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

tests/e2e_tests/test_staking_sudo.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,3 +540,31 @@ def test_staking(local_chain, wallet_setup):
540540
assert yuma3_val["value"] is True
541541
assert yuma3_val["normalized_value"] is True
542542
print("✅ Passed staking and sudo commands")
543+
544+
change_arbitrary_hyperparam = exec_command_alice(
545+
command="sudo",
546+
sub_command="set",
547+
extra_args=[
548+
"--wallet-path",
549+
wallet_path_alice,
550+
"--wallet-name",
551+
wallet_alice.name,
552+
"--hotkey",
553+
wallet_alice.hotkey_str,
554+
"--chain",
555+
"ws://127.0.0.1:9945",
556+
"--netuid",
557+
netuid,
558+
"--param",
559+
"sudo_set_bonds_penalty", # arbitrary hyperparam
560+
"--value",
561+
"0", # int/float value
562+
"--no-prompt",
563+
"--json-output",
564+
],
565+
)
566+
change_arbitrary_hyperparam_json = json.loads(change_arbitrary_hyperparam.stdout)
567+
assert change_arbitrary_hyperparam_json["success"] is True, (
568+
change_arbitrary_hyperparam.stdout,
569+
change_arbitrary_hyperparam.stderr,
570+
)

0 commit comments

Comments
 (0)