Skip to content

Commit a0494b2

Browse files
committed
fail test if unbond transaction fail
1 parent ca0225d commit a0494b2

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

integration_tests/test_staking_cache.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -472,12 +472,11 @@ def test_staking_cache_unbonding_validator(cronos_staking_cache):
472472
rsp = cli.unbond_amount(val_addr, unbond_amount, "validator")
473473
print(f"Unbonding response: {rsp}")
474474

475-
if rsp["code"] == 0:
476-
print("Unbonding transaction successful")
477-
else:
478-
msg = f"Warning: Unbonding returned code {rsp['code']}: "
479-
msg += rsp.get("raw_log", "")
480-
print(msg)
475+
assert rsp["code"] == 0, (
476+
f"Validator self-unbond returned code {rsp['code']}: "
477+
f"{rsp.get('raw_log', rsp)}"
478+
)
479+
print("Unbonding transaction successful")
481480

482481
wait_for_new_blocks(cli, 1)
483482

0 commit comments

Comments
 (0)