diff --git a/cardano_node_tests/tests/tests_conway/conway_common.py b/cardano_node_tests/tests/tests_conway/conway_common.py index 5f6a4bdf6..751f1470f 100644 --- a/cardano_node_tests/tests/tests_conway/conway_common.py +++ b/cardano_node_tests/tests/tests_conway/conway_common.py @@ -165,6 +165,7 @@ def cast_vote( drep_skip_votes: bool = False, spo_skip_votes: bool = False, use_build_cmd: bool = True, + build_method: str | None = None, witness_count_add: int = 0, ) -> governance_utils.VotedVotes: """Cast a vote.""" @@ -175,6 +176,12 @@ def cast_vote( votes_spo = [] anchor_data = governance_utils.get_default_anchor_data() + if build_method is None: + if use_build_cmd: + build_method = clusterlib_utils.BuildMethods.BUILD + else: + build_method = clusterlib_utils.BuildMethods.BUILD_RAW + if approve_cc is not None: _votes_cc = [ None # This CC member doesn't vote, his votes count as "No" @@ -283,7 +290,7 @@ def cast_vote( votes=votes_simple, keys=keys_all, script_votes=script_votes, - use_build_cmd=use_build_cmd, + build_method=build_method, witness_count_add=witness_count_add, ) diff --git a/cardano_node_tests/tests/tests_conway/test_constitution.py b/cardano_node_tests/tests/tests_conway/test_constitution.py index 8cb5bb5cf..16f70060d 100644 --- a/cardano_node_tests/tests/tests_conway/test_constitution.py +++ b/cardano_node_tests/tests/tests_conway/test_constitution.py @@ -144,7 +144,7 @@ def _plutus_cert_rec( cluster_obj=cluster, name_template=name_template, src_address=pool_users[0].payment.address, - use_build_cmd=True, + build_method=clusterlib_utils.BuildMethods.BUILD, txouts=txouts, tx_files=tx_files, ) @@ -240,7 +240,7 @@ def _dereg_stake() -> None: cluster_obj=cluster, name_template=f"{temp_template}_dereg", src_address=pool_users[0].payment.address, - use_build_cmd=False, # Workaround for CLI issue 942 + build_method=clusterlib_utils.BuildMethods.BUILD_RAW, # Workaround for CLI issue 942 tx_files=tx_files, withdrawals=withdrawals, deposit=-sum(s.registration_deposit for __, s in pool_users_info), @@ -281,7 +281,7 @@ def _retire_dreps() -> None: cluster_obj=cluster, name_template=f"{temp_template}_ret", src_address=pool_users[0].payment.address, - use_build_cmd=True, + build_method=clusterlib_utils.BuildMethods.BUILD, tx_files=tx_files, complex_certs=ret_certs, deposit=-sum(d.deposit for d in drep_script_data), @@ -425,7 +425,7 @@ def test_change_constitution( approve_cc=False, approve_drep=False, approve_spo=False, - use_build_cmd=False, # cardano-cli issue #650 + build_method=clusterlib_utils.BuildMethods.BUILD_RAW, # cardano-cli issue #650 ) err_str = str(excinfo.value) assert "StakePoolVoter" in err_str, err_str @@ -440,7 +440,7 @@ def test_change_constitution( action_ix=action_ix, approve_cc=False, approve_drep=False, - use_build_cmd=False, # cardano-cli issue #650 + build_method=clusterlib_utils.BuildMethods.BUILD_RAW, # cardano-cli issue #650 ) # Vote & approve the action @@ -454,7 +454,7 @@ def test_change_constitution( action_ix=action_ix, approve_cc=True, approve_drep=True, - use_build_cmd=False, # cardano-cli issue #650 + build_method=clusterlib_utils.BuildMethods.BUILD_RAW, # cardano-cli issue #650 ) assert cluster.g_query.get_epoch() == init_epoch, ( @@ -498,7 +498,7 @@ def _check_cli_query(): action_ix=action_ix, approve_cc=False, approve_drep=False, - use_build_cmd=False, # cardano-cli issue #650 + build_method=clusterlib_utils.BuildMethods.BUILD_RAW, # cardano-cli issue #650 ) next_rat_state = rat_gov_state["nextRatifyState"] @@ -566,7 +566,7 @@ def _check_cli_query(): action_ix=action_ix, approve_cc=False, approve_drep=False, - use_build_cmd=False, # cardano-cli issue #650 + build_method=clusterlib_utils.BuildMethods.BUILD_RAW, # cardano-cli issue #650 ) err_str = str(excinfo.value) assert "(GovActionsDoNotExist" in err_str, err_str