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