|
1 | 1 | import pytest |
2 | | -from tarantool.connection import os |
3 | 2 |
|
4 | 3 | from utils import ( |
5 | | - get_fixture_tcs_params, |
6 | | - is_tarantool_ee, |
7 | | - is_tarantool_less_3, |
8 | 4 | run_command_and_get_output, |
9 | 5 | ) |
10 | 6 |
|
11 | | -fixture_tcs_params = get_fixture_tcs_params( |
12 | | - os.path.join(os.path.dirname(os.path.abspath(__file__)), "test_tcs_app"), |
13 | | -) |
14 | | - |
15 | 7 |
|
16 | 8 | def to_etcd_key(key): |
17 | 9 | return f"/prefix/config/{key}" |
@@ -41,12 +33,7 @@ def to_etcd_key(key): |
41 | 33 |
|
42 | 34 |
|
43 | 35 | @pytest.mark.parametrize("instance_name", ["etcd", "tcs"]) |
44 | | -def test_cluster_demote_single_key(tt_cmd, tmpdir_with_cfg, instance_name, request, fixture_params): |
45 | | - if instance_name == "tcs": |
46 | | - if is_tarantool_less_3() or not is_tarantool_ee(): |
47 | | - pytest.skip() |
48 | | - for k, v in fixture_tcs_params.items(): |
49 | | - fixture_params[k] = v |
| 36 | +def test_cluster_demote_single_key(tt_cmd, tmpdir_with_cfg, instance_name, request): |
50 | 37 | instance = request.getfixturevalue(instance_name) |
51 | 38 | tmpdir = tmpdir_with_cfg |
52 | 39 | conn = instance.conn() |
@@ -104,13 +91,7 @@ def test_cluster_demote_many_keys( |
104 | 91 | key, |
105 | 92 | instance_name, |
106 | 93 | request, |
107 | | - fixture_params, |
108 | 94 | ): |
109 | | - if instance_name == "tcs": |
110 | | - if is_tarantool_less_3() or not is_tarantool_ee(): |
111 | | - pytest.skip() |
112 | | - for k, v in fixture_tcs_params.items(): |
113 | | - fixture_params[k] = v |
114 | 95 | instance = request.getfixturevalue(instance_name) |
115 | 96 | tmpdir = tmpdir_with_cfg |
116 | 97 | conn = instance.conn() |
@@ -186,15 +167,9 @@ def test_cluster_demote_no_auth( |
186 | 167 | tt_cmd, |
187 | 168 | tmpdir_with_cfg, |
188 | 169 | instance_name, |
189 | | - fixture_params, |
190 | 170 | request, |
191 | 171 | err_msg, |
192 | 172 | ): |
193 | | - if instance_name == "tcs": |
194 | | - if is_tarantool_less_3() or not is_tarantool_ee(): |
195 | | - pytest.skip() |
196 | | - for k, v in fixture_tcs_params.items(): |
197 | | - fixture_params[k] = v |
198 | 173 | instance = request.getfixturevalue(instance_name) |
199 | 174 | tmpdir = tmpdir_with_cfg |
200 | 175 |
|
@@ -231,14 +206,8 @@ def test_cluster_demote_bad_auth( |
231 | 206 | tmpdir_with_cfg, |
232 | 207 | instance_name, |
233 | 208 | err_msg, |
234 | | - fixture_params, |
235 | 209 | request, |
236 | 210 | ): |
237 | | - if instance_name == "tcs": |
238 | | - if is_tarantool_less_3() or not is_tarantool_ee(): |
239 | | - pytest.skip() |
240 | | - for k, v in fixture_tcs_params.items(): |
241 | | - fixture_params[k] = v |
242 | 211 | instance = request.getfixturevalue(instance_name) |
243 | 212 | tmpdir = tmpdir_with_cfg |
244 | 213 |
|
@@ -268,12 +237,7 @@ def test_cluster_demote_bad_auth( |
268 | 237 | ("tcs", "env"), |
269 | 238 | ], |
270 | 239 | ) |
271 | | -def test_cluster_demote_auth(tt_cmd, tmpdir_with_cfg, instance_name, auth, fixture_params, request): |
272 | | - if instance_name == "tcs": |
273 | | - if is_tarantool_less_3() or not is_tarantool_ee(): |
274 | | - pytest.skip() |
275 | | - for k, v in fixture_tcs_params.items(): |
276 | | - fixture_params[k] = v |
| 240 | +def test_cluster_demote_auth(tt_cmd, tmpdir_with_cfg, instance_name, auth, request): |
277 | 241 | instance = request.getfixturevalue(instance_name) |
278 | 242 | tmpdir = tmpdir_with_cfg |
279 | 243 | conn = instance.conn() |
|
0 commit comments