diff --git a/cardano_node_tests/tests/tests_conway/test_info.py b/cardano_node_tests/tests/tests_conway/test_info.py index 78fa1854a..10c0fd3dc 100644 --- a/cardano_node_tests/tests/tests_conway/test_info.py +++ b/cardano_node_tests/tests/tests_conway/test_info.py @@ -233,23 +233,6 @@ def test_info( ], "Ratification is delayed unexpectedly" reqc.cip038_05.success() - # Check action view - governance_utils.check_action_view(cluster_obj=cluster, action_data=info_action) - - # Check vote view - reqc.cli022.start(url=helpers.get_vcs_link()) - if votes_cc: - governance_utils.check_vote_view(cluster_obj=cluster, vote_data=votes_cc[0]) - governance_utils.check_vote_view(cluster_obj=cluster, vote_data=votes_drep[0]) - governance_utils.check_vote_view(cluster_obj=cluster, vote_data=votes_spo[0]) - reqc.cli022.success() - - # Check dbsync - dbsync_utils.check_votes( - votes=governance_utils.VotedVotes(cc=votes_cc, drep=votes_drep, spo=votes_spo), - txhash=vote_txid, - ) - # Check deposit is returned reqc.cip034ex.start(url=helpers.get_vcs_link()) @@ -267,3 +250,20 @@ def test_info( deposit_returned == init_return_account_balance + action_deposit_amt ), "Incorrect return account balance" reqc.cip034ex.success() + + # Check action view + governance_utils.check_action_view(cluster_obj=cluster, action_data=info_action) + + # Check vote view + reqc.cli022.start(url=helpers.get_vcs_link()) + if votes_cc: + governance_utils.check_vote_view(cluster_obj=cluster, vote_data=votes_cc[0]) + governance_utils.check_vote_view(cluster_obj=cluster, vote_data=votes_drep[0]) + governance_utils.check_vote_view(cluster_obj=cluster, vote_data=votes_spo[0]) + reqc.cli022.success() + + # Check dbsync + dbsync_utils.check_votes( + votes=governance_utils.VotedVotes(cc=votes_cc, drep=votes_drep, spo=votes_spo), + txhash=vote_txid, + ) diff --git a/cardano_node_tests/tests/tests_conway/test_pparam_update.py b/cardano_node_tests/tests/tests_conway/test_pparam_update.py index 328222635..df91299e3 100644 --- a/cardano_node_tests/tests/tests_conway/test_pparam_update.py +++ b/cardano_node_tests/tests/tests_conway/test_pparam_update.py @@ -1249,14 +1249,9 @@ def _check_state(state: dict): err_str = str(excinfo.value) assert "(GovActionsDoNotExist" in err_str, err_str - # Check vote view - if fin_voted_votes.cc: - governance_utils.check_vote_view(cluster_obj=cluster, vote_data=fin_voted_votes.cc[0]) - if fin_voted_votes.drep: - governance_utils.check_vote_view(cluster_obj=cluster, vote_data=fin_voted_votes.drep[0]) - # Check deposit return for both after enactment and expiration - [r.start(url=helpers.get_vcs_link()) for r in (reqc.cip034ex, reqc.cip034en)] + _url = helpers.get_vcs_link() + [r.start(url=_url) for r in (reqc.cip034ex, reqc.cip034en)] # First wait to ensure that all proposals are expired/enacted for deposit to be retuned _cur_epoch = cluster.g_query.get_epoch() @@ -1268,13 +1263,19 @@ def _check_state(state: dict): total_deposit_return = cluster.g_query.get_stake_addr_info( pool_user_lg.stake.address ).reward_account_balance - # Check total deposit return accounting for both expired and enaacted actions + # Check total deposit return accounting for both expired and enacted actions assert ( total_deposit_return == init_return_account_balance + deposit_amt * submitted_proposal_count ), "Incorrect return account balance" [r.success() for r in (reqc.cip034ex, reqc.cip034en)] + # Check vote view + if fin_voted_votes.cc: + governance_utils.check_vote_view(cluster_obj=cluster, vote_data=fin_voted_votes.cc[0]) + if fin_voted_votes.drep: + governance_utils.check_vote_view(cluster_obj=cluster, vote_data=fin_voted_votes.drep[0]) + if db_errors_final: raise AssertionError("\n".join(db_errors_final)) [r.success() for r in (reqc.cip080, reqc.cip081, reqc.cip082, reqc.cip083)]