|
5 | 5 | import re
|
6 | 6 | from http import HTTPStatus
|
7 | 7 |
|
| 8 | +import allure |
8 | 9 | import pytest
|
9 | 10 | import requests
|
10 | 11 | from cardano_clusterlib import clusterlib
|
11 | 12 |
|
| 13 | +from cardano_node_tests.utils import configuration |
12 | 14 | from cardano_node_tests.utils import dbsync_queries
|
13 | 15 | from cardano_node_tests.utils import dbsync_types
|
14 | 16 | from cardano_node_tests.utils import dbsync_utils
|
|
18 | 20 |
|
19 | 21 | LOGGER = logging.getLogger(__name__)
|
20 | 22 |
|
| 23 | +pytestmark = [ |
| 24 | + pytest.mark.skipif(not configuration.HAS_SMASH, reason="SMASH is not available"), |
| 25 | + pytest.mark.smash, |
| 26 | +] |
| 27 | + |
21 | 28 |
|
22 | 29 | def check_request_error(
|
23 | 30 | err: requests.exceptions.RequestException,
|
@@ -45,7 +52,6 @@ def check_request_error(
|
45 | 52 | assert actual_description == expected_description
|
46 | 53 |
|
47 | 54 |
|
48 |
| -@pytest.mark.smash |
49 | 55 | class TestBasicSmash:
|
50 | 56 | """Basic tests for SMASH service."""
|
51 | 57 |
|
@@ -75,6 +81,8 @@ def smash(
|
75 | 81 | pytest.skip("SMASH client is not available. Skipping test.")
|
76 | 82 | return smash
|
77 | 83 |
|
| 84 | + @allure.link(helpers.get_vcs_link()) |
| 85 | + @pytest.mark.smoke |
78 | 86 | def test_fetch_pool_metadata(
|
79 | 87 | self, locked_pool: dbsync_types.PoolDataRecord, smash: smash_utils.SmashClient
|
80 | 88 | ):
|
@@ -102,6 +110,8 @@ def _query_func():
|
102 | 110 | )
|
103 | 111 | assert expected_metadata == actual_metadata
|
104 | 112 |
|
| 113 | + @allure.link(helpers.get_vcs_link()) |
| 114 | + @pytest.mark.smoke |
105 | 115 | def test_delist_pool(
|
106 | 116 | self,
|
107 | 117 | locked_pool: dbsync_types.PoolDataRecord,
|
@@ -143,6 +153,8 @@ def pool_cleanup():
|
143 | 153 | except requests.exceptions.RequestException as err:
|
144 | 154 | check_request_error(err, HTTPStatus.BAD_REQUEST, "DbInsertError", err_msg)
|
145 | 155 |
|
| 156 | + @allure.link(helpers.get_vcs_link()) |
| 157 | + @pytest.mark.smoke |
146 | 158 | def test_enlist_pool(
|
147 | 159 | self,
|
148 | 160 | locked_pool: dbsync_types.PoolDataRecord,
|
@@ -173,6 +185,8 @@ def test_enlist_pool(
|
173 | 185 | expected_res_enlist = smash_utils.PoolData(pool_id=pool_id)
|
174 | 186 | assert expected_res_enlist == actual_res_enlist
|
175 | 187 |
|
| 188 | + @allure.link(helpers.get_vcs_link()) |
| 189 | + @pytest.mark.smoke |
176 | 190 | def test_reserve_ticker(
|
177 | 191 | self,
|
178 | 192 | cluster: clusterlib.ClusterLib,
|
|
0 commit comments