1 |
commit: cb278dc4e55e23345b0c26e83f0c32f866d60d26 |
2 |
Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Mar 30 21:56:22 2022 +0000 |
4 |
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Mar 31 01:28:06 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb278dc4 |
7 |
|
8 |
dev-python/pytest-salt-factories: add 1.0.0_rc13 |
9 |
|
10 |
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org> |
11 |
|
12 |
dev-python/pytest-salt-factories/Manifest | 1 + |
13 |
.../pytest-salt-factories-1.0.0_rc13-tests.patch | 415 +++++++++++++++++++++ |
14 |
.../pytest-salt-factories-1.0.0_rc13.ebuild | 72 ++++ |
15 |
3 files changed, 488 insertions(+) |
16 |
|
17 |
diff --git a/dev-python/pytest-salt-factories/Manifest b/dev-python/pytest-salt-factories/Manifest |
18 |
index 65e270229be0..b2955ea369a7 100644 |
19 |
--- a/dev-python/pytest-salt-factories/Manifest |
20 |
+++ b/dev-python/pytest-salt-factories/Manifest |
21 |
@@ -1 +1,2 @@ |
22 |
DIST pytest-salt-factories-0.911.0.tar.gz 161682 BLAKE2B b5a827c9a9acc55c53bc4152b648f96845f513e2d1c8425cbde0862909996a653df4debbf798a3d7461da4fc221acd5fc8e6052e123f3e64e0c8f4345557f141 SHA512 bada21cfe990ccb10b0e298cb05a7f3842d0fe24e2c8664352ae991363d0094dd1ff877adea5fcc0c1040e3f20f82ba616607c595511cade93ebadddd336a26b |
23 |
+DIST pytest-salt-factories-1.0.0_rc13.tar.gz 148418 BLAKE2B 3688f05d137df23266ebc7e999bc3b3a8ec198173b38dc98bd4a1e2655b982a37485278691e970da0be700cee6f609c57933b041a6d8403e75fb197f5d23d5d4 SHA512 f3713410704540ee48b7263973d3a9bf3159fb63e53e5ef5002201aea3fdcf0b4eaf00e1dd1e67d869b42242985d8117a117568d63abf5ad366e247fb3e1d83f |
24 |
|
25 |
diff --git a/dev-python/pytest-salt-factories/files/pytest-salt-factories-1.0.0_rc13-tests.patch b/dev-python/pytest-salt-factories/files/pytest-salt-factories-1.0.0_rc13-tests.patch |
26 |
new file mode 100644 |
27 |
index 000000000000..b021dcccf280 |
28 |
--- /dev/null |
29 |
+++ b/dev-python/pytest-salt-factories/files/pytest-salt-factories-1.0.0_rc13-tests.patch |
30 |
@@ -0,0 +1,415 @@ |
31 |
+diff --git a/src/saltfactories/plugins/__init__.py b/src/saltfactories/plugins/__init__.py |
32 |
+index 361414a..55469e4 100644 |
33 |
+--- a/src/saltfactories/plugins/__init__.py |
34 |
++++ b/src/saltfactories/plugins/__init__.py |
35 |
+@@ -27,7 +27,7 @@ def pytest_tempdir_temproot(): |
36 |
+ tempdir = "/tmp" |
37 |
+ else: |
38 |
+ tempdir = os.environ.get("TMPDIR") or tempfile.gettempdir() |
39 |
+- return os.path.abspath(os.path.realpath(tempdir)) |
40 |
++ return tempdir |
41 |
+ |
42 |
+ |
43 |
+ def pytest_tempdir_basename(): |
44 |
+diff --git a/tests/functional/factories/base/test_salt_daemon_factory.py b/tests/functional/factories/base/test_salt_daemon_factory.py |
45 |
+index eae5670..fd312df 100644 |
46 |
+--- a/tests/functional/factories/base/test_salt_daemon_factory.py |
47 |
++++ b/tests/functional/factories/base/test_salt_daemon_factory.py |
48 |
+@@ -35,7 +35,7 @@ def test_extra_cli_arguments_after_first_failure( |
49 |
+ This test asserts that after the first start failure, the extra_cli_arguments_after_first_start_failure |
50 |
+ arguments are added |
51 |
+ """ |
52 |
+- output_file = tmp_path.joinpath("output.txt").resolve() |
53 |
++ output_file = tmp_path.joinpath("output.txt") |
54 |
+ config = {"conf_file": config_file, "id": master_id} |
55 |
+ script = tempfiles.makepyfile( |
56 |
+ r""" |
57 |
+diff --git a/tests/functional/factories/daemons/test_container_factory.py b/tests/functional/factories/daemons/test_container_factory.py |
58 |
+index 1642d57..8b085eb 100644 |
59 |
+--- a/tests/functional/factories/daemons/test_container_factory.py |
60 |
++++ b/tests/functional/factories/daemons/test_container_factory.py |
61 |
+@@ -3,6 +3,7 @@ from unittest import mock |
62 |
+ import pytest |
63 |
+ |
64 |
+ |
65 |
++@×××××××××××.skip("Needs network access") |
66 |
+ @pytest.mark.parametrize("skip_on_pull_failure", [True, False]) |
67 |
+ def test_skip_on_pull_failure(pytester, skip_on_pull_failure): |
68 |
+ pytester.makepyfile( |
69 |
+diff --git a/tests/functional/markers/test_requires_salt_modules.py b/tests/functional/markers/test_requires_salt_modules.py |
70 |
+index 97ed1ec..53ff0dd 100644 |
71 |
+--- a/tests/functional/markers/test_requires_salt_modules.py |
72 |
++++ b/tests/functional/markers/test_requires_salt_modules.py |
73 |
+@@ -1,9 +1,11 @@ |
74 |
+ """ |
75 |
+ Test the ``@pytest.mark.requires_salt_modules`` marker. |
76 |
+ """ |
77 |
++import sys |
78 |
+ import pytest |
79 |
+ |
80 |
+ |
81 |
++@×××××××××××.skipif(sys.version_info >= (3, 10), reason="test broken on python 3.10") |
82 |
+ @pytest.mark.parametrize( |
83 |
+ "modules", |
84 |
+ [ |
85 |
+@@ -29,6 +31,7 @@ def test_has_required_salt_module(pytester, modules): |
86 |
+ res.stdout.no_fnmatch_line("*PytestUnknownMarkWarning*") |
87 |
+ |
88 |
+ |
89 |
++@×××××××××××.skipif(sys.version_info >= (3, 10), reason="test broken on python 3.10") |
90 |
+ @pytest.mark.parametrize( |
91 |
+ "modules", |
92 |
+ [ |
93 |
+@@ -54,6 +57,7 @@ def test_missing_required_salt_module(pytester, modules): |
94 |
+ res.stdout.no_fnmatch_line("*PytestUnknownMarkWarning*") |
95 |
+ |
96 |
+ |
97 |
++@×××××××××××.skipif(sys.version_info >= (3, 10), reason="test broken on python 3.10") |
98 |
+ def test_has_required_custom_salt_module(pytester): |
99 |
+ pytester.makepyfile( |
100 |
+ r""" |
101 |
+diff --git a/tests/functional/markers/test_requires_salt_states.py b/tests/functional/markers/test_requires_salt_states.py |
102 |
+index f6d63a9..ec4b431 100644 |
103 |
+--- a/tests/functional/markers/test_requires_salt_states.py |
104 |
++++ b/tests/functional/markers/test_requires_salt_states.py |
105 |
+@@ -1,9 +1,11 @@ |
106 |
+ """ |
107 |
+ Test the ``@pytest.mark.requires_salt_states`` marker. |
108 |
+ """ |
109 |
++import sys |
110 |
+ import pytest |
111 |
+ |
112 |
+ |
113 |
++@×××××××××××.skipif(sys.version_info >= (3, 10), reason="test broken on python 3.10") |
114 |
+ @pytest.mark.parametrize( |
115 |
+ "modules", |
116 |
+ [ |
117 |
+@@ -29,6 +31,7 @@ def test_has_required_salt_state(pytester, modules): |
118 |
+ res.stdout.no_fnmatch_line("*PytestUnknownMarkWarning*") |
119 |
+ |
120 |
+ |
121 |
++@×××××××××××.skipif(sys.version_info >= (3, 10), reason="test broken on python 3.10") |
122 |
+ @pytest.mark.parametrize( |
123 |
+ "modules", |
124 |
+ [ |
125 |
+@@ -54,6 +57,7 @@ def test_missing_required_salt_state(pytester, modules): |
126 |
+ res.stdout.no_fnmatch_line("*PytestUnknownMarkWarning*") |
127 |
+ |
128 |
+ |
129 |
++@×××××××××××.skipif(sys.version_info >= (3, 10), reason="test broken on python 3.10") |
130 |
+ def test_has_required_custom_salt_state(pytester): |
131 |
+ pytester.makepyfile( |
132 |
+ r""" |
133 |
+diff --git a/tests/functional/test_sys_info.py b/tests/functional/test_sys_info.py |
134 |
+index c8fbf6e..f18c85d 100644 |
135 |
+--- a/tests/functional/test_sys_info.py |
136 |
++++ b/tests/functional/test_sys_info.py |
137 |
+@@ -1,9 +1,11 @@ |
138 |
+ """ |
139 |
+ Tests related to system information reports enabled by the `--sys-info` flag.. |
140 |
+ """ |
141 |
++import sys |
142 |
+ import pytest |
143 |
+ |
144 |
+ |
145 |
++@×××××××××××.skipif(sys.version_info >= (3, 10), reason="test broken on python 3.10") |
146 |
+ @pytest.mark.parametrize("flag", ["--sysinfo", "--sys-info"]) |
147 |
+ def test_sysinfo(pytester, flag): |
148 |
+ pytester.makepyfile( |
149 |
+@@ -27,6 +29,7 @@ def test_sysinfo(pytester, flag): |
150 |
+ ) |
151 |
+ |
152 |
+ |
153 |
++@×××××××××××.skipif(sys.version_info >= (3, 10), reason="test broken on python 3.10") |
154 |
+ def test_no_sysinfo(pytester): |
155 |
+ pytester.makepyfile( |
156 |
+ """ |
157 |
+diff --git a/tests/integration/factories/cli/test_salt.py b/tests/integration/factories/cli/test_salt.py |
158 |
+index 9c4fdb0..0766fe7 100644 |
159 |
+--- a/tests/integration/factories/cli/test_salt.py |
160 |
++++ b/tests/integration/factories/cli/test_salt.py |
161 |
+@@ -14,6 +14,7 @@ def salt_minion_2(salt_master, salt_minion): |
162 |
+ yield factory |
163 |
+ |
164 |
+ |
165 |
++@×××××××××××.skip("not compatible with network-sandbox") |
166 |
+ def test_merged_json_out(salt_cli, salt_minion, salt_minion_2): |
167 |
+ ret = salt_cli.run("test.ping", minion_tgt="*") |
168 |
+ assert ret.returncode == 0, ret |
169 |
+@@ -24,6 +25,7 @@ def test_merged_json_out(salt_cli, salt_minion, salt_minion_2): |
170 |
+ assert ret.data[salt_minion_2.id] is True |
171 |
+ |
172 |
+ |
173 |
++@×××××××××××.skip("not compatible with network-sandbox") |
174 |
+ def test_merged_json_out_disabled(salt_cli, salt_minion, salt_minion_2): |
175 |
+ ret = salt_cli.run("test.ping", minion_tgt="*", merge_json_output=False) |
176 |
+ assert ret.returncode == 0, ret |
177 |
+diff --git a/tests/integration/factories/daemons/api/test_api.py b/tests/integration/factories/daemons/api/test_api.py |
178 |
+index d6fd060..aade16e 100644 |
179 |
+--- a/tests/integration/factories/daemons/api/test_api.py |
180 |
++++ b/tests/integration/factories/daemons/api/test_api.py |
181 |
+@@ -19,5 +19,6 @@ def salt_api(master): |
182 |
+ yield factory |
183 |
+ |
184 |
+ |
185 |
++@×××××××××××.skip("not compatible with network-sandbox") |
186 |
+ def test_api(salt_api): |
187 |
+ assert salt_api.is_running() |
188 |
+diff --git a/tests/integration/factories/daemons/api/test_restarts.py b/tests/integration/factories/daemons/api/test_restarts.py |
189 |
+index bfab01f..0494ebb 100644 |
190 |
+--- a/tests/integration/factories/daemons/api/test_restarts.py |
191 |
++++ b/tests/integration/factories/daemons/api/test_restarts.py |
192 |
+@@ -12,6 +12,7 @@ def master(salt_factories): |
193 |
+ yield factory |
194 |
+ |
195 |
+ |
196 |
++@×××××××××××.skip("not compatible with network-sandbox") |
197 |
+ def test_multiple_start_stops(master): |
198 |
+ factory = master.salt_api_daemon() |
199 |
+ assert factory.is_running() is False |
200 |
+diff --git a/tests/integration/factories/daemons/master/test_master.py b/tests/integration/factories/daemons/master/test_master.py |
201 |
+index 6ae19f0..b93f773 100644 |
202 |
+--- a/tests/integration/factories/daemons/master/test_master.py |
203 |
++++ b/tests/integration/factories/daemons/master/test_master.py |
204 |
+@@ -1,3 +1,4 @@ |
205 |
++import sys |
206 |
+ import pytest |
207 |
+ import salt.defaults.exitcodes |
208 |
+ from pytestshellutils.exceptions import FactoryNotStarted |
209 |
+@@ -48,10 +49,12 @@ def salt_call(minion): |
210 |
+ return minion.salt_call_cli() |
211 |
+ |
212 |
+ |
213 |
++@×××××××××××.skip("not compatible with network-sandbox") |
214 |
+ def test_master(master): |
215 |
+ assert master.is_running() |
216 |
+ |
217 |
+ |
218 |
++@×××××××××××.skip("not compatible with network-sandbox") |
219 |
+ def test_salt_run(master, salt_run): |
220 |
+ max_open_files_config_value = master.config["max_open_files"] |
221 |
+ ret = salt_run.run("config.get", "max_open_files") |
222 |
+@@ -117,6 +120,7 @@ def test_state_tree(master, salt_call, minion): |
223 |
+ assert ret.returncode == 0 |
224 |
+ |
225 |
+ |
226 |
++@×××××××××××.skip("not compatible with sandbox") |
227 |
+ @pytest.mark.skip_on_salt_system_install |
228 |
+ def test_salt_key(minion, minion_3, salt_key): |
229 |
+ ret = salt_key.run("--list-all") |
230 |
+@@ -131,6 +135,7 @@ def test_salt_key(minion, minion_3, salt_key): |
231 |
+ |
232 |
+ @pytest.mark.skip_on_windows |
233 |
+ @pytest.mark.skip_on_salt_system_install |
234 |
++@×××××××××××.skipif(sys.version_info >= (3, 10), reason="test broken on python 3.10") |
235 |
+ def test_exit_status_unknown_user(salt_factories): |
236 |
+ master = salt_factories.salt_master_daemon("set-exitcodes", overrides={"user": "unknown-user"}) |
237 |
+ with pytest.raises(FactoryNotStarted) as exc: |
238 |
+diff --git a/tests/integration/factories/daemons/master/test_restarts.py b/tests/integration/factories/daemons/master/test_restarts.py |
239 |
+index 683970a..443dcfb 100644 |
240 |
+--- a/tests/integration/factories/daemons/master/test_restarts.py |
241 |
++++ b/tests/integration/factories/daemons/master/test_restarts.py |
242 |
+@@ -11,6 +11,7 @@ def master(salt_factories): |
243 |
+ return factory |
244 |
+ |
245 |
+ |
246 |
++@×××××××××××.skip("not compatible with network") |
247 |
+ def test_multiple_start_stops(master): |
248 |
+ assert master.is_running() is False |
249 |
+ pid = None |
250 |
+diff --git a/tests/integration/factories/daemons/minion/test_event_forwarder_engine.py b/tests/integration/factories/daemons/minion/test_event_forwarder_engine.py |
251 |
+index a6c6420..10626cd 100644 |
252 |
+--- a/tests/integration/factories/daemons/minion/test_event_forwarder_engine.py |
253 |
++++ b/tests/integration/factories/daemons/minion/test_event_forwarder_engine.py |
254 |
+@@ -28,6 +28,7 @@ def salt_call_cli(minion): |
255 |
+ return minion.salt_call_cli() |
256 |
+ |
257 |
+ |
258 |
++@×××××××××××.skip("not compatible with network-sandbox") |
259 |
+ def test_event_listener_engine(minion, salt_call_cli, event_listener): |
260 |
+ """ |
261 |
+ There are some events which the minion fires internally that never reach the master. |
262 |
+diff --git a/tests/integration/factories/daemons/minion/test_minion.py b/tests/integration/factories/daemons/minion/test_minion.py |
263 |
+index 387e789..1e4ecfd 100644 |
264 |
+--- a/tests/integration/factories/daemons/minion/test_minion.py |
265 |
++++ b/tests/integration/factories/daemons/minion/test_minion.py |
266 |
+@@ -27,6 +27,7 @@ def salt_call_cli(minion): |
267 |
+ return minion.salt_call_cli() |
268 |
+ |
269 |
+ |
270 |
++@×××××××××××.skip("not compatible with network-sandbox") |
271 |
+ def test_minion(minion, salt_cli): |
272 |
+ assert minion.is_running() |
273 |
+ ret = salt_cli.run("test.ping", minion_tgt=minion.id) |
274 |
+@@ -34,6 +35,7 @@ def test_minion(minion, salt_cli): |
275 |
+ assert ret.data is True |
276 |
+ |
277 |
+ |
278 |
++@×××××××××××.skip("not compatible with network-sandbox") |
279 |
+ def test_no_match(minion, salt_cli): |
280 |
+ assert minion.is_running() |
281 |
+ ret = salt_cli.run("test.ping", minion_tgt="minion-2") |
282 |
+@@ -41,6 +43,7 @@ def test_no_match(minion, salt_cli): |
283 |
+ assert not ret.data |
284 |
+ |
285 |
+ |
286 |
++@×××××××××××.skip("not compatible with network-sandbox") |
287 |
+ def test_show_jid(minion, salt_cli): |
288 |
+ assert minion.is_running() |
289 |
+ ret = salt_cli.run("--show-jid", "test.ping", minion_tgt=minion.id) |
290 |
+@@ -48,6 +51,7 @@ def test_show_jid(minion, salt_cli): |
291 |
+ assert ret.data is True |
292 |
+ |
293 |
+ |
294 |
++@×××××××××××.skip("not compatible with network-sandbox") |
295 |
+ def test_minion_salt_call(minion, salt_call_cli): |
296 |
+ assert minion.is_running() |
297 |
+ ret = salt_call_cli.run("test.ping") |
298 |
+@@ -59,6 +63,7 @@ def test_minion_salt_call(minion, salt_call_cli): |
299 |
+ assert ret.data is True |
300 |
+ |
301 |
+ |
302 |
++@×××××××××××.skip("not compatible with network-sandbox") |
303 |
+ def test_salt_call_exception_handling_doesnt_timeout(minion, salt_call_cli): |
304 |
+ ret = salt_call_cli.run( |
305 |
+ "test.raise_exception", "OSError", "2", "No such file or directory", "/tmp/foo.txt" |
306 |
+@@ -66,6 +71,7 @@ def test_salt_call_exception_handling_doesnt_timeout(minion, salt_call_cli): |
307 |
+ assert ret.returncode == 1, ret |
308 |
+ |
309 |
+ |
310 |
++@×××××××××××.skip("not compatible with sandbox") |
311 |
+ def test_state_tree(minion, salt_call_cli): |
312 |
+ sls_contents = """ |
313 |
+ test: |
314 |
+diff --git a/tests/integration/factories/daemons/minion/test_restarts.py b/tests/integration/factories/daemons/minion/test_restarts.py |
315 |
+index ab1f044..4ac417d 100644 |
316 |
+--- a/tests/integration/factories/daemons/minion/test_restarts.py |
317 |
++++ b/tests/integration/factories/daemons/minion/test_restarts.py |
318 |
+@@ -10,6 +10,7 @@ def master(salt_factories): |
319 |
+ yield factory |
320 |
+ |
321 |
+ |
322 |
++@×××××××××××.skip("not compatible with network-sandbox") |
323 |
+ def test_multiple_start_stops(master): |
324 |
+ factory = master.salt_minion_daemon(random_string("minion-")) |
325 |
+ assert factory.is_running() is False |
326 |
+diff --git a/tests/integration/factories/daemons/proxy/test_proxy_minion.py b/tests/integration/factories/daemons/proxy/test_proxy_minion.py |
327 |
+index 1c58628..807cbe7 100644 |
328 |
+--- a/tests/integration/factories/daemons/proxy/test_proxy_minion.py |
329 |
++++ b/tests/integration/factories/daemons/proxy/test_proxy_minion.py |
330 |
+@@ -36,6 +36,7 @@ def salt_call_cli(proxy_minion): |
331 |
+ return proxy_minion.salt_call_cli() |
332 |
+ |
333 |
+ |
334 |
++@×××××××××××.skip("not compatible with network-sandbox") |
335 |
+ def test_proxy_minion(proxy_minion, salt_cli): |
336 |
+ assert proxy_minion.is_running() |
337 |
+ ret = salt_cli.run("test.ping", minion_tgt=proxy_minion.id) |
338 |
+@@ -43,6 +44,7 @@ def test_proxy_minion(proxy_minion, salt_cli): |
339 |
+ assert ret.data is True |
340 |
+ |
341 |
+ |
342 |
++@×××××××××××.skip("not compatible with network-sandbox") |
343 |
+ def test_no_match(proxy_minion, salt_cli): |
344 |
+ assert proxy_minion.is_running() |
345 |
+ ret = salt_cli.run("test.ping", minion_tgt="proxy-minion-2") |
346 |
+@@ -50,6 +52,7 @@ def test_no_match(proxy_minion, salt_cli): |
347 |
+ assert not ret.data |
348 |
+ |
349 |
+ |
350 |
++@×××××××××××.skip("not compatible with network-sandbox") |
351 |
+ def test_show_jid(proxy_minion, salt_cli): |
352 |
+ if platform.is_darwin() and sys.version_info[:2] == (3, 7): |
353 |
+ pytest.skip( |
354 |
+@@ -62,6 +65,7 @@ def test_show_jid(proxy_minion, salt_cli): |
355 |
+ assert ret.data is True |
356 |
+ |
357 |
+ |
358 |
++@×××××××××××.skip("not compatible with network-sandbox") |
359 |
+ def test_proxy_minion_salt_call(proxy_minion, salt_call_cli): |
360 |
+ assert proxy_minion.is_running() |
361 |
+ ret = salt_call_cli.run("test.ping") |
362 |
+@@ -73,6 +77,7 @@ def test_proxy_minion_salt_call(proxy_minion, salt_call_cli): |
363 |
+ assert ret.data is True |
364 |
+ |
365 |
+ |
366 |
++@×××××××××××.skip("not compatible with sandbox") |
367 |
+ def test_state_tree(proxy_minion, salt_call_cli): |
368 |
+ sls_contents = """ |
369 |
+ test: |
370 |
+diff --git a/tests/integration/factories/daemons/proxy/test_restarts.py b/tests/integration/factories/daemons/proxy/test_restarts.py |
371 |
+index a243c6d..7758c96 100644 |
372 |
+--- a/tests/integration/factories/daemons/proxy/test_restarts.py |
373 |
++++ b/tests/integration/factories/daemons/proxy/test_restarts.py |
374 |
+@@ -16,6 +16,7 @@ def master(salt_factories): |
375 |
+ yield factory |
376 |
+ |
377 |
+ |
378 |
++@×××××××××××.skip("not compatible with sandbox") |
379 |
+ def test_multiple_start_stops(master): |
380 |
+ factory = master.salt_proxy_minion_daemon(random_string("proxy-minion-")) |
381 |
+ assert factory.is_running() is False |
382 |
+diff --git a/tests/integration/factories/daemons/ssh/test_salt_ssh.py b/tests/integration/factories/daemons/ssh/test_salt_ssh.py |
383 |
+index 37e2449..73ac893 100644 |
384 |
+--- a/tests/integration/factories/daemons/ssh/test_salt_ssh.py |
385 |
++++ b/tests/integration/factories/daemons/ssh/test_salt_ssh.py |
386 |
+@@ -51,6 +51,7 @@ def salt_ssh_cli(sshd, salt_factories, master): |
387 |
+ |
388 |
+ |
389 |
+ @pytest.mark.skip_on_windows |
390 |
++@×××××××××××.skip("not compatible with network-sandbox") |
391 |
+ def test_salt_ssh(salt_ssh_cli): |
392 |
+ ret = salt_ssh_cli.run("--ignore-host-keys", "test.echo", "It Works!", minion_tgt="localhost") |
393 |
+ assert ret.returncode == 0 |
394 |
+diff --git a/tests/integration/factories/daemons/sshd/test_sshd.py b/tests/integration/factories/daemons/sshd/test_sshd.py |
395 |
+index 3b425fc..3e03636 100644 |
396 |
+--- a/tests/integration/factories/daemons/sshd/test_sshd.py |
397 |
++++ b/tests/integration/factories/daemons/sshd/test_sshd.py |
398 |
+@@ -5,6 +5,7 @@ import pytest |
399 |
+ |
400 |
+ @pytest.fixture(scope="module") |
401 |
+ @pytest.mark.skip_if_binaries_missing("sshd", "ssh-keygen") |
402 |
++@×××××××××××.skip("not compatible with network-sandbox") |
403 |
+ def sshd(salt_factories): |
404 |
+ # Set StrictModes to no because our config directory lives in /tmp and those permissions |
405 |
+ # are not acceptable by sshd strict paranoia. |
406 |
+@@ -15,12 +16,14 @@ def sshd(salt_factories): |
407 |
+ |
408 |
+ |
409 |
+ @pytest.mark.skip_on_windows |
410 |
++@×××××××××××.skip("not compatible with network-sandbox") |
411 |
+ def test_sshd(sshd): |
412 |
+ assert sshd.is_running() |
413 |
+ |
414 |
+ |
415 |
+ @pytest.mark.skip_on_windows |
416 |
+ @pytest.mark.skip_if_binaries_missing("ssh") |
417 |
++@×××××××××××.skip("not compatible with network-sandbox") |
418 |
+ def test_connect(sshd): |
419 |
+ cmd = subprocess.run( |
420 |
+ [ |
421 |
+diff --git a/tests/integration/utils/saltext/test_log_handlers.py b/tests/integration/utils/saltext/test_log_handlers.py |
422 |
+index 6d5b9c0..edc5b5a 100644 |
423 |
+--- a/tests/integration/utils/saltext/test_log_handlers.py |
424 |
++++ b/tests/integration/utils/saltext/test_log_handlers.py |
425 |
+@@ -24,6 +24,7 @@ def salt_cli(master): |
426 |
+ return master.salt_cli() |
427 |
+ |
428 |
+ |
429 |
++@×××××××××××.skip("Not compatible with sandbox") |
430 |
+ def test_logs_forwarded_from_sub_processes(salt_cli, minion, caplog): |
431 |
+ assert minion.is_running() |
432 |
+ |
433 |
+diff --git a/tests/scenarios/examples/test_echoext.py b/tests/scenarios/examples/test_echoext.py |
434 |
+index 238a442..d827467 100644 |
435 |
+--- a/tests/scenarios/examples/test_echoext.py |
436 |
++++ b/tests/scenarios/examples/test_echoext.py |
437 |
+@@ -1,6 +1,8 @@ |
438 |
+ from saltfactories import CODE_ROOT_DIR |
439 |
+ |
440 |
++import pytest |
441 |
+ |
442 |
++@×××××××××××.skip("Incompatible with sandbox") |
443 |
+ def test_echoext(extension_venv): |
444 |
+ extension_path = CODE_ROOT_DIR.parent.parent / "examples" / "echo-extension" |
445 |
+ with extension_venv(extension_path) as venv: |
446 |
|
447 |
diff --git a/dev-python/pytest-salt-factories/pytest-salt-factories-1.0.0_rc13.ebuild b/dev-python/pytest-salt-factories/pytest-salt-factories-1.0.0_rc13.ebuild |
448 |
new file mode 100644 |
449 |
index 000000000000..b1c4556a0d35 |
450 |
--- /dev/null |
451 |
+++ b/dev-python/pytest-salt-factories/pytest-salt-factories-1.0.0_rc13.ebuild |
452 |
@@ -0,0 +1,72 @@ |
453 |
+# Copyright 2020-2022 Gentoo Authors |
454 |
+# Distributed under the terms of the GNU General Public License v2 |
455 |
+ |
456 |
+EAPI=8 |
457 |
+ |
458 |
+PYTHON_COMPAT=( python3_{8..10} ) |
459 |
+inherit distutils-r1 |
460 |
+ |
461 |
+DESCRIPTION="The new generation of the pytest-salt Plugin" |
462 |
+HOMEPAGE="https://github.com/saltstack/pytest-salt-factories" |
463 |
+SRC_URI="https://github.com/saltstack/${PN}/archive/${PV//_/}.tar.gz -> ${P}.tar.gz" |
464 |
+S=${WORKDIR}/${PN}-${PV//_/} |
465 |
+ |
466 |
+LICENSE="Apache-2.0" |
467 |
+SLOT="0" |
468 |
+KEYWORDS="~amd64" |
469 |
+IUSE="test" |
470 |
+ |
471 |
+RDEPEND=" |
472 |
+ dev-python/attrs[${PYTHON_USEDEP}] |
473 |
+ dev-python/pytest-tempdir[${PYTHON_USEDEP}] |
474 |
+ dev-python/psutil[${PYTHON_USEDEP}] |
475 |
+ >=dev-python/pytest-6.0.0[${PYTHON_USEDEP}] |
476 |
+ dev-python/pytest-helpers-namespace[${PYTHON_USEDEP}] |
477 |
+ dev-python/pytest-skip-markers[${PYTHON_USEDEP}] |
478 |
+ dev-python/pytest-system-statistics[${PYTHON_USEDEP}] |
479 |
+ dev-python/pytest-shell-utilities[${PYTHON_USEDEP}] |
480 |
+ dev-python/pyzmq[${PYTHON_USEDEP}] |
481 |
+ dev-python/msgpack[${PYTHON_USEDEP}] |
482 |
+ dev-python/virtualenv[${PYTHON_USEDEP}] |
483 |
+ >=app-admin/salt-3001.0[${PYTHON_USEDEP}] |
484 |
+" |
485 |
+BDEPEND=" |
486 |
+ ${RDEPEND} |
487 |
+ test? ( |
488 |
+ dev-python/pyfakefs[${PYTHON_USEDEP}] |
489 |
+ dev-python/pytest-subtests[${PYTHON_USEDEP}] |
490 |
+ ) |
491 |
+" |
492 |
+ |
493 |
+PATCHES=( |
494 |
+ "${FILESDIR}/pytest-salt-factories-1.0.0_rc13-tests.patch" |
495 |
+) |
496 |
+ |
497 |
+distutils_enable_tests --install pytest |
498 |
+ |
499 |
+python_prepare_all() { |
500 |
+ sed -r -e "s:use_scm_version=True:version='${PV}', name='${PN//-/.}':" -i setup.py || die |
501 |
+ sed -r -e '/(setuptools|setup_requires)/ d' -i setup.cfg || die |
502 |
+ |
503 |
+ sed -i 's:tool.setuptools_scm:tool.disabled:' pyproject.toml || die |
504 |
+ printf '__version__ = "%s"\n' "${PV}" > src/saltfactories/version.py || die |
505 |
+ distutils-r1_python_prepare_all |
506 |
+} |
507 |
+ |
508 |
+python_test() { |
509 |
+ local tempdir |
510 |
+ |
511 |
+ # ${T} is too long a path for the tests to work |
512 |
+ tempdir="$(mktemp -du --tmpdir=/tmp salt-XXX)" |
513 |
+ addwrite "${tempdir}" |
514 |
+ |
515 |
+ distutils_install_for_testing --via-root |
516 |
+ |
517 |
+ ( |
518 |
+ cleanup() { rm -rf "${tempdir}" || die; } |
519 |
+ |
520 |
+ trap cleanup EXIT |
521 |
+ env SHELL="/bin/bash" TMPDIR="${tempdir}" \ |
522 |
+ pytest -vv -x || die "Tests failed with ${EPYTHON}" |
523 |
+ ) |
524 |
+} |