Skip to content

Commit d292a77

Browse files
authored
Merge pull request #2939 from IntersectMBO/add_smash_annotations
feat(tests): add allure links and smoke marks to SMASH tests
2 parents 9f48726 + 3ab3770 commit d292a77

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

cardano_node_tests/tests/test_smash.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
import re
66
from http import HTTPStatus
77

8+
import allure
89
import pytest
910
import requests
1011
from cardano_clusterlib import clusterlib
1112

13+
from cardano_node_tests.utils import configuration
1214
from cardano_node_tests.utils import dbsync_queries
1315
from cardano_node_tests.utils import dbsync_types
1416
from cardano_node_tests.utils import dbsync_utils
@@ -18,6 +20,11 @@
1820

1921
LOGGER = logging.getLogger(__name__)
2022

23+
pytestmark = [
24+
pytest.mark.skipif(not configuration.HAS_SMASH, reason="SMASH is not available"),
25+
pytest.mark.smash,
26+
]
27+
2128

2229
def check_request_error(
2330
err: requests.exceptions.RequestException,
@@ -45,7 +52,6 @@ def check_request_error(
4552
assert actual_description == expected_description
4653

4754

48-
@pytest.mark.smash
4955
class TestBasicSmash:
5056
"""Basic tests for SMASH service."""
5157

@@ -75,6 +81,8 @@ def smash(
7581
pytest.skip("SMASH client is not available. Skipping test.")
7682
return smash
7783

84+
@allure.link(helpers.get_vcs_link())
85+
@pytest.mark.smoke
7886
def test_fetch_pool_metadata(
7987
self, locked_pool: dbsync_types.PoolDataRecord, smash: smash_utils.SmashClient
8088
):
@@ -102,6 +110,8 @@ def _query_func():
102110
)
103111
assert expected_metadata == actual_metadata
104112

113+
@allure.link(helpers.get_vcs_link())
114+
@pytest.mark.smoke
105115
def test_delist_pool(
106116
self,
107117
locked_pool: dbsync_types.PoolDataRecord,
@@ -143,6 +153,8 @@ def pool_cleanup():
143153
except requests.exceptions.RequestException as err:
144154
check_request_error(err, HTTPStatus.BAD_REQUEST, "DbInsertError", err_msg)
145155

156+
@allure.link(helpers.get_vcs_link())
157+
@pytest.mark.smoke
146158
def test_enlist_pool(
147159
self,
148160
locked_pool: dbsync_types.PoolDataRecord,
@@ -173,6 +185,8 @@ def test_enlist_pool(
173185
expected_res_enlist = smash_utils.PoolData(pool_id=pool_id)
174186
assert expected_res_enlist == actual_res_enlist
175187

188+
@allure.link(helpers.get_vcs_link())
189+
@pytest.mark.smoke
176190
def test_reserve_ticker(
177191
self,
178192
cluster: clusterlib.ClusterLib,

0 commit comments

Comments
 (0)