Skip to content

Commit

Permalink
Merge pull request #2654 from IntersectMBO/review_testnets_marker
Browse files Browse the repository at this point in the history
refactor: review "testnets" marker
  • Loading branch information
mkoura authored Sep 30, 2024
2 parents faa9b77 + dd88e7f commit 6451000
Show file tree
Hide file tree
Showing 44 changed files with 365 additions and 103 deletions.
8 changes: 6 additions & 2 deletions cardano_node_tests/tests/test_addr_registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ def pool_users_disposable(
return pool_users


@pytest.mark.testnets
@pytest.mark.smoke
class TestRegisterAddr:
"""Tests for stake address registration and deregistration."""

@allure.link(helpers.get_vcs_link())
@common.PARAM_USE_BUILD_CMD
@pytest.mark.testnets
@pytest.mark.dbsync
def test_deregister_registered(
self,
Expand Down Expand Up @@ -194,6 +194,7 @@ def _build_dereg() -> clusterlib.TxRawOutput:

@allure.link(helpers.get_vcs_link())
@common.PARAM_USE_BUILD_CMD
@pytest.mark.testnets
@pytest.mark.dbsync
def test_addr_registration_deregistration(
self,
Expand Down Expand Up @@ -286,6 +287,7 @@ def test_addr_registration_deregistration(
@allure.link(helpers.get_vcs_link())
@submit_utils.PARAM_SUBMIT_METHOD
@common.PARAM_USE_BUILD_CMD
@pytest.mark.testnets
@pytest.mark.dbsync
def test_addr_registration_certificate_order(
self,
Expand Down Expand Up @@ -376,12 +378,12 @@ def test_addr_registration_certificate_order(
assert user_registered.stake.address in tx_db_record.stake_deregistration


@pytest.mark.testnets
@pytest.mark.smoke
class TestNegative:
"""Tests that are expected to fail."""

@allure.link(helpers.get_vcs_link())
@pytest.mark.testnets
def test_registration_cert_with_wrong_key(
self,
cluster: clusterlib.ClusterLib,
Expand All @@ -404,6 +406,7 @@ def test_registration_cert_with_wrong_key(
assert "Expected: StakeVerificationKeyShelley" in err_msg, err_msg

@allure.link(helpers.get_vcs_link())
@pytest.mark.testnets
def test_register_addr_with_wrong_key(
self,
cluster: clusterlib.ClusterLib,
Expand Down Expand Up @@ -441,6 +444,7 @@ def test_register_addr_with_wrong_key(

@allure.link(helpers.get_vcs_link())
@common.PARAM_USE_BUILD_CMD
@pytest.mark.testnets
def test_deregister_not_registered_addr(
self,
cluster: clusterlib.ClusterLib,
Expand Down
8 changes: 5 additions & 3 deletions cardano_node_tests/tests/test_delegation.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,6 @@ def _get_pool_id(idx: int) -> str:
@pytest.mark.order(7)
@pytest.mark.dbsync
@pytest.mark.long
@pytest.mark.testnets
def test_deregister_delegated(
self,
cluster_manager: cluster_management.ClusterManager,
Expand Down Expand Up @@ -563,7 +562,6 @@ def test_deregister_delegated(
@pytest.mark.order(7)
@pytest.mark.dbsync
@pytest.mark.long
@pytest.mark.testnets
def test_undelegate(
self,
cluster_manager: cluster_management.ClusterManager,
Expand Down Expand Up @@ -850,12 +848,12 @@ def _build_deleg_dereg() -> clusterlib.TxRawOutput:
assert pool_id == tx_db_deleg.stake_delegation[0].pool_id


@pytest.mark.testnets
@pytest.mark.smoke
class TestNegative:
"""Tests that are expected to fail."""

@allure.link(helpers.get_vcs_link())
@pytest.mark.testnets
def test_delegation_cert_with_wrong_key(
self,
cluster_and_pool: tp.Tuple[clusterlib.ClusterLib, str],
Expand All @@ -882,6 +880,7 @@ def test_delegation_cert_with_wrong_key(
), err_msg

@allure.link(helpers.get_vcs_link())
@pytest.mark.testnets
def test_delegate_addr_with_wrong_key(
self,
cluster_and_pool: tp.Tuple[clusterlib.ClusterLib, str],
Expand Down Expand Up @@ -943,6 +942,7 @@ def test_delegate_addr_with_wrong_key(

@allure.link(helpers.get_vcs_link())
@common.PARAM_USE_BUILD_CMD
@pytest.mark.testnets
def test_delegate_unknown_addr(
self,
cluster_and_pool: tp.Tuple[clusterlib.ClusterLib, str],
Expand Down Expand Up @@ -1001,6 +1001,7 @@ def test_delegate_unknown_addr(

@allure.link(helpers.get_vcs_link())
@common.PARAM_USE_BUILD_CMD
@pytest.mark.testnets
def test_delegate_deregistered_addr(
self,
cluster_and_pool: tp.Tuple[clusterlib.ClusterLib, str],
Expand Down Expand Up @@ -1104,6 +1105,7 @@ def test_delegate_deregistered_addr(
), err_msg

@allure.link(helpers.get_vcs_link())
@pytest.mark.testnets
def test_delegatee_not_registered(
self,
cluster: clusterlib.ClusterLib,
Expand Down
14 changes: 12 additions & 2 deletions cardano_node_tests/tests/test_env_network_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ def payment_addrs(


@pytest.mark.smoke
@pytest.mark.testnets
class TestNetworkIdEnv:
"""Tests for `CARDANO_NODE_NETWORK_ID`."""

@allure.link(helpers.get_vcs_link())
@pytest.mark.testnets
def test_query_protocol_state(
self,
skip_on_no_env: None, # noqa: ARG002
Expand All @@ -142,6 +142,7 @@ def test_query_protocol_state(
assert "lastSlot" in state

@allure.link(helpers.get_vcs_link())
@pytest.mark.testnets
def test_query_stake_distribution(
self,
skip_on_no_env: None, # noqa: ARG002
Expand All @@ -155,6 +156,7 @@ def test_query_stake_distribution(
assert next(iter(distrib)).startswith("pool")

@allure.link(helpers.get_vcs_link())
@pytest.mark.testnets
def test_query_protocol_params(
self,
skip_on_no_env: None, # noqa: ARG002
Expand All @@ -168,6 +170,7 @@ def test_query_protocol_params(
assert "protocolVersion" in protocol_params

@allure.link(helpers.get_vcs_link())
@pytest.mark.testnets
def test_query_pool_state(
self,
skip_on_no_env: None, # noqa: ARG002
Expand All @@ -180,6 +183,7 @@ def test_query_pool_state(
cluster.g_query.get_pool_state(stake_pool_id=POOL_ID)

@allure.link(helpers.get_vcs_link())
@pytest.mark.testnets
def test_query_stake_addr_info(
self,
skip_on_no_env: None, # noqa: ARG002
Expand All @@ -193,6 +197,7 @@ def test_query_stake_addr_info(

@allure.link(helpers.get_vcs_link())
@common.SKIPIF_BUILD_UNUSABLE
@pytest.mark.testnets
def test_build_transfer_funds(
self,
skip_on_no_env: None, # noqa: ARG002
Expand Down Expand Up @@ -243,7 +248,6 @@ def test_build_transfer_funds(


@pytest.mark.smoke
@pytest.mark.testnets
class TestNegativeNetworkIdEnv:
"""Negative tests for `CARDANO_NODE_NETWORK_ID`."""

Expand All @@ -260,6 +264,7 @@ def _ignore_log_errors(self) -> None:
@allure.link(helpers.get_vcs_link())
@PARAM_ENV_SCENARIO
@PARAM_ARG_SCENARIO
@pytest.mark.testnets
def test_neg_query_protocol_state(
self,
skip_on_no_env: None, # noqa: ARG002
Expand Down Expand Up @@ -289,6 +294,7 @@ def test_neg_query_protocol_state(
@allure.link(helpers.get_vcs_link())
@PARAM_ENV_SCENARIO
@PARAM_ARG_SCENARIO
@pytest.mark.testnets
def test_neg_query_stake_distribution(
self,
skip_on_no_env: None, # noqa: ARG002
Expand Down Expand Up @@ -317,6 +323,7 @@ def test_neg_query_stake_distribution(
@allure.link(helpers.get_vcs_link())
@PARAM_ENV_SCENARIO
@PARAM_ARG_SCENARIO
@pytest.mark.testnets
def test_neg_query_protocol_params(
self,
skip_on_no_env: None, # noqa: ARG002
Expand Down Expand Up @@ -345,6 +352,7 @@ def test_neg_query_protocol_params(
@allure.link(helpers.get_vcs_link())
@PARAM_ENV_SCENARIO
@PARAM_ARG_SCENARIO
@pytest.mark.testnets
def test_neg_query_pool_state(
self,
skip_on_no_env: None, # noqa: ARG002
Expand Down Expand Up @@ -373,6 +381,7 @@ def test_neg_query_pool_state(
@allure.link(helpers.get_vcs_link())
@PARAM_ENV_SCENARIO
@PARAM_ARG_SCENARIO
@pytest.mark.testnets
def test_neg_query_stake_addr_info(
self,
skip_on_no_env: None, # noqa: ARG002
Expand Down Expand Up @@ -402,6 +411,7 @@ def test_neg_query_stake_addr_info(
@common.SKIPIF_BUILD_UNUSABLE
@PARAM_ENV_SCENARIO
@PARAM_ARG_SCENARIO
@pytest.mark.testnets
def test_neg_build_transfer_funds(
self,
skip_on_no_env: None, # noqa: ARG002
Expand Down
Loading

0 comments on commit 6451000

Please sign in to comment.