diff --git a/cardano_node_tests/tests/common.py b/cardano_node_tests/tests/common.py index 2600c3c07..fa3c9d03e 100644 --- a/cardano_node_tests/tests/common.py +++ b/cardano_node_tests/tests/common.py @@ -22,6 +22,8 @@ MAX_INT64 = (2**63) - 1 MAX_UINT64 = (2**64) - 1 +COMPAT_ERAS = ("shelley", "allegra", "mary", "alonzo", "babbage") + ADDR_ALPHABET = string.ascii_lowercase + string.digits ORDER5_BYRON = ( @@ -156,6 +158,8 @@ ids=("plutus_v2", "plutus_v3"), ) +PARAM_COMPAT_ERAS = pytest.mark.parametrize("era", COMPAT_ERAS) + # Intervals for `wait_for_epoch_interval` (negative values are counted from the end of an epoch) if cluster_nodes.get_cluster_type().type == cluster_nodes.ClusterType.LOCAL: diff --git a/cardano_node_tests/tests/test_addr_registration.py b/cardano_node_tests/tests/test_addr_registration.py index 6ee92465b..d15b67649 100644 --- a/cardano_node_tests/tests/test_addr_registration.py +++ b/cardano_node_tests/tests/test_addr_registration.py @@ -816,7 +816,7 @@ def _submit_tx( raise ValueError(err) @allure.link(helpers.get_vcs_link()) - @pytest.mark.parametrize("era", ("shelley", "allegra", "mary", "alonzo", "babbage")) + @common.PARAM_COMPAT_ERAS @pytest.mark.testnets @pytest.mark.smoke def test_legacy_stake_addr_registration_rejected_in_conway( diff --git a/cardano_node_tests/tests/test_delegation.py b/cardano_node_tests/tests/test_delegation.py index 26b880247..678d28920 100644 --- a/cardano_node_tests/tests/test_delegation.py +++ b/cardano_node_tests/tests/test_delegation.py @@ -1320,7 +1320,7 @@ def test_delegatee_not_registered( ), exc_value @allure.link(helpers.get_vcs_link()) - @pytest.mark.parametrize("era", ("shelley", "allegra", "mary", "alonzo", "babbage")) + @common.PARAM_COMPAT_ERAS @pytest.mark.testnets @pytest.mark.smoke def test_legacy_stake_delegation_rejected_in_conway( diff --git a/cardano_node_tests/tests/test_pools.py b/cardano_node_tests/tests/test_pools.py index 24f655353..2942c6ce0 100644 --- a/cardano_node_tests/tests/test_pools.py +++ b/cardano_node_tests/tests/test_pools.py @@ -2610,7 +2610,7 @@ def test_stake_pool_long_metadata_url( ) @allure.link(helpers.get_vcs_link()) - @pytest.mark.parametrize("era", ("shelley", "allegra", "mary", "alonzo", "babbage")) + @common.PARAM_COMPAT_ERAS @pytest.mark.testnets @pytest.mark.smoke def test_legacy_pool_registration_rejected_in_conway( diff --git a/cardano_node_tests/tests/tests_conway/test_conway.py b/cardano_node_tests/tests/tests_conway/test_conway.py index 595c09e09..a186c5d78 100644 --- a/cardano_node_tests/tests/tests_conway/test_conway.py +++ b/cardano_node_tests/tests/tests_conway/test_conway.py @@ -212,7 +212,7 @@ def test_ratify_state_fields(self, cluster: clusterlib.ClusterLib): class TestNegativeLegacyGovernance: @allure.link(helpers.get_vcs_link()) - @pytest.mark.parametrize("era", ("shelley", "allegra", "mary", "alonzo", "babbage")) + @common.PARAM_COMPAT_ERAS @pytest.mark.smoke def test_mixed_legacy_govaction_and_conway_vote_cert_fails( self, 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 dfa573e44..39e5f98dd 100644 --- a/cardano_node_tests/tests/tests_conway/test_pparam_update.py +++ b/cardano_node_tests/tests/tests_conway/test_pparam_update.py @@ -1462,7 +1462,7 @@ class TestLegacyProposals: @allure.link(helpers.get_vcs_link()) @submit_utils.PARAM_SUBMIT_METHOD - @pytest.mark.parametrize("era", ("shelley", "allegra", "mary", "alonzo", "babbage")) + @common.PARAM_COMPAT_ERAS @pytest.mark.smoke def test_legacy_proposal_submit( self, diff --git a/cardano_node_tests/tests/tests_conway/test_treasury_withdrawals.py b/cardano_node_tests/tests/tests_conway/test_treasury_withdrawals.py index daa327bca..8776ae876 100644 --- a/cardano_node_tests/tests/tests_conway/test_treasury_withdrawals.py +++ b/cardano_node_tests/tests/tests_conway/test_treasury_withdrawals.py @@ -736,7 +736,7 @@ def payment_addr(self, cluster_manager, cluster): ) @allure.link(helpers.get_vcs_link()) - @pytest.mark.parametrize("era", ("shelley", "allegra", "mary", "alonzo", "babbage")) + @common.PARAM_COMPAT_ERAS @pytest.mark.parametrize( "mir_cert", ("to_treasury", "to_rewards", "treasury_to_addr", "reserves_to_addr"),