Skip to content

Commit f33b6b8

Browse files
authored
Merge pull request #404 from opentensor/fix/e2e-tests/260325
Fixes staking/unstaking e2e tests
2 parents aad7521 + c82eb08 commit f33b6b8

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

tests/e2e_tests/test_staking_sudo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def test_staking(local_chain, wallet_setup):
136136
stake_added = cleaned_stake[8].split("│")[3].strip().split()[0]
137137
assert Balance.from_tao(float(stake_added)) >= Balance.from_tao(90)
138138

139-
# Execute remove_stake command and remove all 100 TAO from Alice
139+
# Execute remove_stake command and remove all alpha stakes from Alice
140140
remove_stake = exec_command_alice(
141141
command="stake",
142142
sub_command="remove",
@@ -152,7 +152,7 @@ def test_staking(local_chain, wallet_setup):
152152
"--chain",
153153
"ws://127.0.0.1:9945",
154154
"--amount",
155-
"100",
155+
str(float(stake_added) - 1),
156156
"--tolerance",
157157
"0.1",
158158
"--partial",

tests/e2e_tests/test_unstaking.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -208,21 +208,11 @@ def test_unstaking(local_chain, wallet_setup):
208208
cleaned_stake = [
209209
re.sub(r"\s+", " ", line) for line in stake_list.stdout.splitlines()
210210
]
211-
stake_after_unstaking_netuid_2 = cleaned_stake[9].split("│")[3].strip().split()[0]
211+
stake_after_unstaking_netuid_2 = cleaned_stake[10].split("│")[3].strip().split()[0]
212212
assert Balance.from_tao(float(stake_after_unstaking_netuid_2)) <= Balance.from_tao(
213213
float(inital_stake_netuid_2)
214214
)
215215

216-
print(
217-
"Bob wallet deets: ",
218-
"hotkey: ",
219-
wallet_bob.hotkey_str,
220-
"name: ",
221-
wallet_bob.name,
222-
"path: ",
223-
wallet_bob.path,
224-
)
225-
226216
# Remove all alpha stakes
227217
unstake_alpha = exec_command_bob(
228218
command="stake",

0 commit comments

Comments
 (0)