Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pytest-salt-factories/, dev-python/pytest-salt-factories/files/
Date: Mon, 03 Jan 2022 22:30:17
Message-Id: 1641248987.56cf1d56651bdd2b8e952fdc890463312ac2ca16.mgorny@gentoo
1 commit: 56cf1d56651bdd2b8e952fdc890463312ac2ca16
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 3 22:28:56 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 3 22:29:47 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56cf1d56
7
8 dev-python/pytest-salt-factories: Remove old
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/pytest-salt-factories/Manifest | 1 -
13 .../pytest-salt-factories-0.121.1-tests.patch | 294 ---------------------
14 .../pytest-salt-factories-0.121.1-r1.ebuild | 63 -----
15 3 files changed, 358 deletions(-)
16
17 diff --git a/dev-python/pytest-salt-factories/Manifest b/dev-python/pytest-salt-factories/Manifest
18 index 2a5ad00fdc45..65e270229be0 100644
19 --- a/dev-python/pytest-salt-factories/Manifest
20 +++ b/dev-python/pytest-salt-factories/Manifest
21 @@ -1,2 +1 @@
22 -DIST pytest-salt-factories-0.121.1.tar.gz 102121 BLAKE2B 92cd5953b11377f1646f01b86a677a50216d16bcb944235a3f04176aecbb005974c415adcbf23cc391aab41b1ee9596984516ab61ecdd8c944d4ce707c39ab00 SHA512 32252695c6e8b17ef17d3330c4b0b38bdce89201d5573b4efa3531a72e826ee1fb26fea3ad0408401dec867cee405f21031804c32eb8fe6ceaa00925b17725a1
23 DIST pytest-salt-factories-0.911.0.tar.gz 161682 BLAKE2B b5a827c9a9acc55c53bc4152b648f96845f513e2d1c8425cbde0862909996a653df4debbf798a3d7461da4fc221acd5fc8e6052e123f3e64e0c8f4345557f141 SHA512 bada21cfe990ccb10b0e298cb05a7f3842d0fe24e2c8664352ae991363d0094dd1ff877adea5fcc0c1040e3f20f82ba616607c595511cade93ebadddd336a26b
24
25 diff --git a/dev-python/pytest-salt-factories/files/pytest-salt-factories-0.121.1-tests.patch b/dev-python/pytest-salt-factories/files/pytest-salt-factories-0.121.1-tests.patch
26 deleted file mode 100644
27 index 3e85580c9158..000000000000
28 --- a/dev-python/pytest-salt-factories/files/pytest-salt-factories-0.121.1-tests.patch
29 +++ /dev/null
30 @@ -1,294 +0,0 @@
31 -diff --git a/saltfactories/plugin.py b/saltfactories/plugin.py
32 -index b29a115..9d68c34 100644
33 ---- a/saltfactories/plugin.py
34 -+++ b/saltfactories/plugin.py
35 -@@ -21,7 +21,7 @@ def pytest_tempdir_temproot():
36 - tempdir = os.environ.get("TMPDIR") or tempfile.gettempdir()
37 - else:
38 - tempdir = "/tmp"
39 -- return os.path.abspath(os.path.realpath(tempdir))
40 -+ return os.path.abspath(tempdir)
41 -
42 -
43 - def pytest_tempdir_basename():
44 -diff --git a/tests/functional/markers/test_requires_network.py b/tests/functional/markers/test_requires_network.py
45 -index 8b57368..d58f0a1 100644
46 ---- a/tests/functional/markers/test_requires_network.py
47 -+++ b/tests/functional/markers/test_requires_network.py
48 -@@ -9,7 +9,10 @@ from unittest import mock
49 - from saltfactories.utils import ports
50 - from saltfactories.utils import socket
51 -
52 -+import pytest
53 -
54 -+
55 -+@×××××××××××.skip("not compatible with network-sandbox")
56 - def test_has_local_network(testdir):
57 - testdir.makepyfile(
58 - """
59 -diff --git a/tests/integration/factories/cli/test_salt.py b/tests/integration/factories/cli/test_salt.py
60 -index 17fce6c..7bd2789 100644
61 ---- a/tests/integration/factories/cli/test_salt.py
62 -+++ b/tests/integration/factories/cli/test_salt.py
63 -@@ -17,6 +17,7 @@ def salt_minion_2(salt_master, salt_minion):
64 - yield factory
65 -
66 -
67 -+@×××××××××××.skip("not compatible with network-sandbox")
68 - def test_merged_json_out(salt_cli, salt_minion, salt_minion_2):
69 - ret = salt_cli.run("test.ping", minion_tgt="*")
70 - assert ret.exitcode == 0, ret
71 -@@ -27,6 +28,7 @@ def test_merged_json_out(salt_cli, salt_minion, salt_minion_2):
72 - assert ret.json[salt_minion_2.id] is True
73 -
74 -
75 -+@×××××××××××.skip("not compatible with network-sandbox")
76 - def test_merged_json_out_disabled(salt_cli, salt_minion, salt_minion_2):
77 - ret = salt_cli.run("test.ping", minion_tgt="*", merge_json_output=False)
78 - assert ret.exitcode == 0, ret
79 -diff --git a/tests/integration/factories/daemons/api/test_api.py b/tests/integration/factories/daemons/api/test_api.py
80 -index 78b8bb7..e20f28c 100644
81 ---- a/tests/integration/factories/daemons/api/test_api.py
82 -+++ b/tests/integration/factories/daemons/api/test_api.py
83 -@@ -23,5 +23,6 @@ def salt_api(master):
84 - yield factory
85 -
86 -
87 -+@×××××××××××.skip("not compatible with network-sandbox")
88 - def test_api(salt_api):
89 - assert salt_api.is_running()
90 -diff --git a/tests/integration/factories/daemons/api/test_restarts.py b/tests/integration/factories/daemons/api/test_restarts.py
91 -index a6c5472..dd15c17 100644
92 ---- a/tests/integration/factories/daemons/api/test_restarts.py
93 -+++ b/tests/integration/factories/daemons/api/test_restarts.py
94 -@@ -16,6 +16,7 @@ def master(salt_factories):
95 - yield factory
96 -
97 -
98 -+@×××××××××××.skip("not compatible with network-sandbox")
99 - def test_multiple_start_stops(master):
100 - factory = master.get_salt_api_daemon()
101 - assert factory.is_running() is False
102 -diff --git a/tests/integration/factories/daemons/master/test_master.py b/tests/integration/factories/daemons/master/test_master.py
103 -index 2676dfa..cbf598e 100644
104 ---- a/tests/integration/factories/daemons/master/test_master.py
105 -+++ b/tests/integration/factories/daemons/master/test_master.py
106 -@@ -46,10 +46,12 @@ def salt_key(master):
107 - return master.get_salt_key_cli()
108 -
109 -
110 -+@×××××××××××.skip("not compatible with network-sandbox")
111 - def test_master(master):
112 - assert master.is_running()
113 -
114 -
115 -+@×××××××××××.skip("not compatible with network-sandbox")
116 - def test_salt_run(master, salt_run):
117 - max_open_files_config_value = master.config["max_open_files"]
118 - ret = salt_run.run("config.get", "max_open_files")
119 -@@ -57,6 +59,7 @@ def test_salt_run(master, salt_run):
120 - assert ret.json == max_open_files_config_value
121 -
122 -
123 -+@×××××××××××.skip("not compatible with network-sandbox")
124 - def test_salt_cp(master, minion, salt_cp, tempfiles):
125 - """
126 - Test copying a file from the master to the minion
127 -@@ -98,6 +101,7 @@ def test_salt_cp(master, minion, salt_cp, tempfiles):
128 - os.unlink(dest)
129 -
130 -
131 -+@×××××××××××.skip("not compatible with network-sandbox")
132 - def test_salt_cp_no_match(master, minion, salt_cp, tempfiles):
133 - assert master.is_running()
134 - assert minion.is_running()
135 -@@ -119,6 +123,7 @@ def test_salt_cp_no_match(master, minion, salt_cp, tempfiles):
136 - os.unlink(dest)
137 -
138 -
139 -+@×××××××××××.skip("not compatible with sandbox")
140 - @pytest.mark.skip_on_salt_system_install
141 - def test_salt_key(master, minion, minion_3, salt_key):
142 - ret = salt_key.run("--list-all")
143 -diff --git a/tests/integration/factories/daemons/master/test_restarts.py b/tests/integration/factories/daemons/master/test_restarts.py
144 -index 6a6852d..70415d0 100644
145 ---- a/tests/integration/factories/daemons/master/test_restarts.py
146 -+++ b/tests/integration/factories/daemons/master/test_restarts.py
147 -@@ -11,6 +11,7 @@ def master(salt_factories):
148 - return factory
149 -
150 -
151 -+@×××××××××××.skip("not compatible with network")
152 - def test_multiple_start_stops(master):
153 - assert master.is_running() is False
154 - pid = None
155 -diff --git a/tests/integration/factories/daemons/minion/test_event_forwarder_engine.py b/tests/integration/factories/daemons/minion/test_event_forwarder_engine.py
156 -index d63e640..653693e 100644
157 ---- a/tests/integration/factories/daemons/minion/test_event_forwarder_engine.py
158 -+++ b/tests/integration/factories/daemons/minion/test_event_forwarder_engine.py
159 -@@ -28,6 +28,7 @@ def salt_call_cli(minion):
160 - return minion.get_salt_call_cli()
161 -
162 -
163 -+@×××××××××××.skip("not compatible with network-sandbox")
164 - def test_event_listener_engine(minion, salt_call_cli, event_listener):
165 - """
166 - There are some events which the minion fires internally that never reach the master.
167 -diff --git a/tests/integration/factories/daemons/minion/test_minion.py b/tests/integration/factories/daemons/minion/test_minion.py
168 -index 64a3df6..ab82e55 100644
169 ---- a/tests/integration/factories/daemons/minion/test_minion.py
170 -+++ b/tests/integration/factories/daemons/minion/test_minion.py
171 -@@ -27,6 +27,7 @@ def salt_call_cli(minion):
172 - return minion.get_salt_call_cli()
173 -
174 -
175 -+@×××××××××××.skip("not compatible with network-sandbox")
176 - def test_minion(minion, salt_cli):
177 - assert minion.is_running()
178 - ret = salt_cli.run("test.ping", minion_tgt=minion.id)
179 -@@ -34,6 +35,7 @@ def test_minion(minion, salt_cli):
180 - assert ret.json is True
181 -
182 -
183 -+@×××××××××××.skip("not compatible with network-sandbox")
184 - def test_no_match(minion, salt_cli):
185 - assert minion.is_running()
186 - ret = salt_cli.run("test.ping", minion_tgt="minion-2")
187 -@@ -41,6 +43,7 @@ def test_no_match(minion, salt_cli):
188 - assert not ret.json
189 -
190 -
191 -+@×××××××××××.skip("not compatible with network-sandbox")
192 - def test_show_jid(minion, salt_cli):
193 - assert minion.is_running()
194 - ret = salt_cli.run("--show-jid", "test.ping", minion_tgt=minion.id)
195 -@@ -48,6 +51,7 @@ def test_show_jid(minion, salt_cli):
196 - assert ret.json is True
197 -
198 -
199 -+@×××××××××××.skip("not compatible with network-sandbox")
200 - def test_minion_salt_call(minion, salt_call_cli):
201 - assert minion.is_running()
202 - ret = salt_call_cli.run("test.ping")
203 -@@ -59,6 +63,7 @@ def test_minion_salt_call(minion, salt_call_cli):
204 - assert ret.json is True
205 -
206 -
207 -+@×××××××××××.skip("not compatible with network-sandbox")
208 - def test_salt_call_exception_handling_doesnt_timeout(minion, salt_call_cli):
209 - ret = salt_call_cli.run(
210 - "test.raise_exception", "OSError", "2", "No such file or directory", "/tmp/foo.txt"
211 -diff --git a/tests/integration/factories/daemons/minion/test_restarts.py b/tests/integration/factories/daemons/minion/test_restarts.py
212 -index a7d9ae0..8f0401b 100644
213 ---- a/tests/integration/factories/daemons/minion/test_restarts.py
214 -+++ b/tests/integration/factories/daemons/minion/test_restarts.py
215 -@@ -10,6 +10,7 @@ def master(salt_factories):
216 - yield factory
217 -
218 -
219 -+@×××××××××××.skip("not compatible with network-sandbox")
220 - def test_multiple_start_stops(master):
221 - factory = master.get_salt_minion_daemon(random_string("minion-"))
222 - assert factory.is_running() is False
223 -diff --git a/tests/integration/factories/daemons/proxy/test_proxy_minion.py b/tests/integration/factories/daemons/proxy/test_proxy_minion.py
224 -index 3bbca21..2e2fb8b 100644
225 ---- a/tests/integration/factories/daemons/proxy/test_proxy_minion.py
226 -+++ b/tests/integration/factories/daemons/proxy/test_proxy_minion.py
227 -@@ -35,6 +35,7 @@ def salt_call_cli(proxy_minion):
228 - return proxy_minion.get_salt_call_cli()
229 -
230 -
231 -+@×××××××××××.skip("not compatible with network-sandbox")
232 - def test_proxy_minion(proxy_minion, salt_cli):
233 - assert proxy_minion.is_running()
234 - ret = salt_cli.run("test.ping", minion_tgt=proxy_minion.id)
235 -@@ -42,6 +43,7 @@ def test_proxy_minion(proxy_minion, salt_cli):
236 - assert ret.json is True
237 -
238 -
239 -+@×××××××××××.skip("not compatible with network-sandbox")
240 - def test_no_match(proxy_minion, salt_cli):
241 - assert proxy_minion.is_running()
242 - ret = salt_cli.run("test.ping", minion_tgt="proxy-minion-2")
243 -@@ -49,6 +51,7 @@ def test_no_match(proxy_minion, salt_cli):
244 - assert not ret.json
245 -
246 -
247 -+@×××××××××××.skip("not compatible with network-sandbox")
248 - def test_show_jid(proxy_minion, salt_cli):
249 - if platform.is_darwin() and sys.version_info[:2] == (3, 7):
250 - pytest.skip(
251 -@@ -61,6 +64,7 @@ def test_show_jid(proxy_minion, salt_cli):
252 - assert ret.json is True
253 -
254 -
255 -+@×××××××××××.skip("not compatible with network-sandbox")
256 - def test_proxy_minion_salt_call(proxy_minion, salt_call_cli):
257 - assert proxy_minion.is_running()
258 - ret = salt_call_cli.run("test.ping")
259 -diff --git a/tests/integration/factories/daemons/proxy/test_restarts.py b/tests/integration/factories/daemons/proxy/test_restarts.py
260 -index 3101204..28652ff 100644
261 ---- a/tests/integration/factories/daemons/proxy/test_restarts.py
262 -+++ b/tests/integration/factories/daemons/proxy/test_restarts.py
263 -@@ -17,6 +17,7 @@ def master(salt_factories):
264 - yield factory
265 -
266 -
267 -+@×××××××××××.skip("not compatible with sandbox")
268 - def test_multiple_start_stops(master):
269 - factory = master.get_salt_proxy_minion_daemon(random_string("proxy-minion-"))
270 - assert factory.is_running() is False
271 -diff --git a/tests/integration/factories/daemons/ssh/test_salt_ssh.py b/tests/integration/factories/daemons/ssh/test_salt_ssh.py
272 -index f58eac4..c3df3de 100644
273 ---- a/tests/integration/factories/daemons/ssh/test_salt_ssh.py
274 -+++ b/tests/integration/factories/daemons/ssh/test_salt_ssh.py
275 -@@ -51,6 +51,7 @@ def salt_ssh_cli(sshd, salt_factories, master):
276 -
277 -
278 - @pytest.mark.skip_on_windows
279 -+@×××××××××××.skip("not compatible with network-sandbox")
280 - def test_salt_ssh(salt_ssh_cli):
281 - ret = salt_ssh_cli.run("--ignore-host-keys", "test.echo", "It Works!", minion_tgt="localhost")
282 - assert ret.exitcode == 0
283 -diff --git a/tests/integration/factories/daemons/sshd/test_sshd.py b/tests/integration/factories/daemons/sshd/test_sshd.py
284 -index 3b425fc..3e03636 100644
285 ---- a/tests/integration/factories/daemons/sshd/test_sshd.py
286 -+++ b/tests/integration/factories/daemons/sshd/test_sshd.py
287 -@@ -5,6 +5,7 @@ import pytest
288 -
289 - @pytest.fixture(scope="module")
290 - @pytest.mark.skip_if_binaries_missing("sshd", "ssh-keygen")
291 -+@×××××××××××.skip("not compatible with network-sandbox")
292 - def sshd(salt_factories):
293 - # Set StrictModes to no because our config directory lives in /tmp and those permissions
294 - # are not acceptable by sshd strict paranoia.
295 -@@ -15,12 +16,14 @@ def sshd(salt_factories):
296 -
297 -
298 - @pytest.mark.skip_on_windows
299 -+@×××××××××××.skip("not compatible with network-sandbox")
300 - def test_sshd(sshd):
301 - assert sshd.is_running()
302 -
303 -
304 - @pytest.mark.skip_on_windows
305 - @pytest.mark.skip_if_binaries_missing("ssh")
306 -+@×××××××××××.skip("not compatible with network-sandbox")
307 - def test_connect(sshd):
308 - cmd = subprocess.run(
309 - [
310 -diff --git a/tests/unit/utils/markers/test_skip_if_no_remote_network.py b/tests/unit/utils/markers/test_skip_if_no_remote_network.py
311 -index 1aa72dc..c4d079e 100644
312 ---- a/tests/unit/utils/markers/test_skip_if_no_remote_network.py
313 -+++ b/tests/unit/utils/markers/test_skip_if_no_remote_network.py
314 -@@ -9,7 +9,10 @@ from unittest import mock
315 - import saltfactories.utils.markers as markers
316 - from saltfactories.utils import socket
317 -
318 -+import pytest
319 -
320 -+
321 -+@×××××××××××.skip("not compatible with network-sandbox")
322 - def test_has_remote_network():
323 - assert markers.skip_if_no_remote_network() is None
324 -
325
326 diff --git a/dev-python/pytest-salt-factories/pytest-salt-factories-0.121.1-r1.ebuild b/dev-python/pytest-salt-factories/pytest-salt-factories-0.121.1-r1.ebuild
327 deleted file mode 100644
328 index e4d2f0f1ee31..000000000000
329 --- a/dev-python/pytest-salt-factories/pytest-salt-factories-0.121.1-r1.ebuild
330 +++ /dev/null
331 @@ -1,63 +0,0 @@
332 -# Copyright 2020-2021 Gentoo Authors
333 -# Distributed under the terms of the GNU General Public License v2
334 -
335 -EAPI=7
336 -
337 -PYTHON_COMPAT=( python3_{7..9} )
338 -inherit distutils-r1
339 -
340 -DESCRIPTION="The new generation of the pytest-salt Plugin"
341 -HOMEPAGE="https://github.com/saltstack/pytest-salt-factories"
342 -SRC_URI="https://github.com/saltstack/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
343 -
344 -LICENSE="Apache-2.0"
345 -SLOT="0"
346 -KEYWORDS="amd64 ~arm ~arm64 x86"
347 -IUSE="test"
348 -
349 -RDEPEND="
350 - >=dev-python/pytest-6.1.1[${PYTHON_USEDEP}]
351 - dev-python/attrs[${PYTHON_USEDEP}]
352 - dev-python/pytest-tempdir[${PYTHON_USEDEP}]
353 - dev-python/psutil[${PYTHON_USEDEP}]
354 - dev-python/pyzmq[${PYTHON_USEDEP}]
355 - dev-python/msgpack[${PYTHON_USEDEP}]
356 - >=app-admin/salt-3001.0[${PYTHON_USEDEP}]
357 -"
358 -BDEPEND="${RDEPEND}"
359 -
360 -PATCHES=(
361 - "${FILESDIR}/pytest-salt-factories-0.121.1-tests.patch"
362 -)
363 -
364 -distutils_enable_tests --install pytest
365 -
366 -python_prepare_all() {
367 - sed -r -e "s:use_scm_version=True:version='${PV}', name='${PN//-/.}':" -i setup.py || die
368 - sed -r -e '/(setuptools|setup_requires)/ d' -i setup.cfg || die
369 -
370 - sed -i 's:tool.setuptools_scm:tool.disabled:' pyproject.toml || die
371 - printf '__version__ = "%s"\n' "${PV}" > saltfactories/version.py || die
372 - distutils-r1_python_prepare_all
373 -}
374 -
375 -python_test() {
376 - local tempdir
377 -
378 - # ${T} is too long a path for the tests to work
379 - tempdir="$(mktemp -du --tmpdir=/tmp salt-XXX)"
380 - mkdir "${T}/$(basename "${tempdir}")"
381 -
382 - addwrite "${tempdir}"
383 - ln -s "$(realpath --relative-to=/tmp "${T}/$(basename "${tempdir}")")" "${tempdir}" || die
384 -
385 - distutils_install_for_testing --via-root
386 -
387 - (
388 - cleanup() { rm -f "${tempdir}" || die; }
389 -
390 - trap cleanup EXIT
391 - SHELL="/bin/bash" TMPDIR="${tempdir}" \
392 - pytest -vv || die "Tests failed with ${EPYTHON}"
393 - )
394 -}