Skip to content

Commit ca0225d

Browse files
committed
fail fast if self-delegation cant be found + remove unused function
1 parent 77e4f42 commit ca0225d

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

integration_tests/test_staking_cache.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@ def cronos_staking_cache(tmp_path_factory):
3535
Path(__file__).parent / "configs/staking_cache.jsonnet",
3636
)
3737

38-
39-
def get_validator_address(cli, node_index):
40-
"""Get validator address for a specific node."""
41-
return cli.address("validator", bech="val")
42-
43-
4438
def get_delegator_address(cli, account_name):
4539
"""Get delegator address for a specific account."""
4640
return cli.address(account_name)
@@ -566,6 +560,14 @@ def test_staking_cache_unbonding_validator(cronos_staking_cache):
566560
print(msg)
567561

568562
break
563+
else:
564+
pytest.fail(
565+
f"Validator self-delegation entry for {val_addr} missing in response."
566+
)
567+
else:
568+
pytest.fail(
569+
f"Failed to fetch self-delegations for {val_account} before unbonding."
570+
)
569571

570572
print("\n=== Test completed successfully ===")
571573

0 commit comments

Comments
 (0)