Skip to content

Commit 43a9cf7

Browse files
committed
fix(tests): handle vote redelegation in PV9
- Added condition to check if the cluster is in PV9 - Ensured vote delegation is empty with PV9 due to ledger issue 4772
1 parent 99e032a commit 43a9cf7

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

cardano_node_tests/tests/tests_conway/test_drep.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1570,11 +1570,17 @@ def _deregister():
15701570
assert not ret_drep_state, "DRep 1 was not retired"
15711571

15721572
stake_addr_info_ret = cluster.g_query.get_stake_addr_info(pool_user_rewards.stake.address)
1573-
if not stake_addr_info_ret.vote_delegation:
1574-
issues.ledger_4772.finish_test()
1575-
assert stake_addr_info_ret.vote_delegation == governance_utils.get_drep_cred_name(
1576-
drep_id=drep2.drep_id
1577-
), "Votes are no longer delegated to DRep 2!"
1573+
1574+
if conway_common.is_in_bootstrap(cluster):
1575+
assert (
1576+
not stake_addr_info_ret.vote_delegation
1577+
), "Due to ledger issue 4772, vote delegation should be empty with PV9"
1578+
else:
1579+
if not stake_addr_info_ret.vote_delegation:
1580+
issues.ledger_4772.finish_test()
1581+
assert stake_addr_info_ret.vote_delegation == governance_utils.get_drep_cred_name(
1582+
drep_id=drep2.drep_id
1583+
), "Votes are no longer delegated to DRep 2!"
15781584

15791585

15801586
class TestDRepActivity:

0 commit comments

Comments
 (0)