|
2 | 2 | from tarantool.connection import os |
3 | 3 |
|
4 | 4 | from utils import ( |
5 | | - get_fixture_tcs_params, |
6 | | - is_tarantool_ee, |
7 | | - is_tarantool_less_3, |
8 | 5 | run_command_and_get_output, |
9 | 6 | ) |
10 | 7 |
|
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 | 8 |
|
16 | 9 | def to_etcd_key(key): |
17 | 10 | return f"/prefix/config/{key}" |
@@ -41,12 +34,7 @@ def to_etcd_key(key): |
41 | 34 |
|
42 | 35 |
|
43 | 36 | @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 |
| 37 | +def test_cluster_demote_single_key(tt_cmd, tmpdir_with_cfg, instance_name, request): |
50 | 38 | instance = request.getfixturevalue(instance_name) |
51 | 39 | tmpdir = tmpdir_with_cfg |
52 | 40 | conn = instance.conn() |
@@ -104,13 +92,7 @@ def test_cluster_demote_many_keys( |
104 | 92 | key, |
105 | 93 | instance_name, |
106 | 94 | request, |
107 | | - fixture_params, |
108 | 95 | ): |
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 | 96 | instance = request.getfixturevalue(instance_name) |
115 | 97 | tmpdir = tmpdir_with_cfg |
116 | 98 | conn = instance.conn() |
@@ -186,15 +168,9 @@ def test_cluster_demote_no_auth( |
186 | 168 | tt_cmd, |
187 | 169 | tmpdir_with_cfg, |
188 | 170 | instance_name, |
189 | | - fixture_params, |
190 | 171 | request, |
191 | 172 | err_msg, |
192 | 173 | ): |
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 | 174 | instance = request.getfixturevalue(instance_name) |
199 | 175 | tmpdir = tmpdir_with_cfg |
200 | 176 |
|
@@ -231,14 +207,8 @@ def test_cluster_demote_bad_auth( |
231 | 207 | tmpdir_with_cfg, |
232 | 208 | instance_name, |
233 | 209 | err_msg, |
234 | | - fixture_params, |
235 | 210 | request, |
236 | 211 | ): |
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 | 212 | instance = request.getfixturevalue(instance_name) |
243 | 213 | tmpdir = tmpdir_with_cfg |
244 | 214 |
|
@@ -268,12 +238,7 @@ def test_cluster_demote_bad_auth( |
268 | 238 | ("tcs", "env"), |
269 | 239 | ], |
270 | 240 | ) |
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 |
| 241 | +def test_cluster_demote_auth(tt_cmd, tmpdir_with_cfg, instance_name, auth, request): |
277 | 242 | instance = request.getfixturevalue(instance_name) |
278 | 243 | tmpdir = tmpdir_with_cfg |
279 | 244 | conn = instance.conn() |
|
0 commit comments