* [gentoo-commits] repo/gentoo:master commit in: dev-python/pytest-salt-factories/, dev-python/pytest-salt-factories/files/
@ 2020-09-04 1:45 Patrick McLean
0 siblings, 0 replies; 6+ messages in thread
From: Patrick McLean @ 2020-09-04 1:45 UTC (permalink / raw
To: gentoo-commits
commit: d990b8600f1771056a7d84d3f5e37ff79138d457
Author: Patrick McLean <patrick.mclean <AT> sony <DOT> com>
AuthorDate: Fri Sep 4 01:45:22 2020 +0000
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Fri Sep 4 01:45:29 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d990b860
dev-python/pytest-salt-factories: New package
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-3.0.5, Repoman-3.0.1
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
dev-python/pytest-salt-factories/Manifest | 1 +
.../files/pytest-salt-factories-0.92.0-setup.patch | 13 ++++++++
dev-python/pytest-salt-factories/metadata.xml | 8 +++++
.../pytest-salt-factories-0.92.0.ebuild | 37 ++++++++++++++++++++++
4 files changed, 59 insertions(+)
diff --git a/dev-python/pytest-salt-factories/Manifest b/dev-python/pytest-salt-factories/Manifest
new file mode 100644
index 00000000000..af8b1dec4dd
--- /dev/null
+++ b/dev-python/pytest-salt-factories/Manifest
@@ -0,0 +1 @@
+DIST pytest-salt-factories-0.92.0.tar.gz 112049 BLAKE2B 054ec70df87bb1c1ccd4217ddf66b1efa1329d95c72cc40a633b5516afbe5bc80b4210560438e039def40a5c4aec3730a36f83c7911fd3a12a7bd5d33d388986 SHA512 308a446c870528437967eb5b3167861818311683dd9c4f55af8aa1766cde29ab438e5bf0ba922933d893f1a5469af4b827c422e59adb12cb2b422302550dfdd5
diff --git a/dev-python/pytest-salt-factories/files/pytest-salt-factories-0.92.0-setup.patch b/dev-python/pytest-salt-factories/files/pytest-salt-factories-0.92.0-setup.patch
new file mode 100644
index 00000000000..d8d1a915a78
--- /dev/null
+++ b/dev-python/pytest-salt-factories/files/pytest-salt-factories-0.92.0-setup.patch
@@ -0,0 +1,13 @@
+diff --git a/setup.py b/setup.py
+index d7cab46..1321f06 100644
+--- a/setup.py
++++ b/setup.py
+@@ -51,7 +51,7 @@ setup(
+ url="https://github.com/saltstack/pytest-salt-factories",
+ description="Pytest Salt Plugin",
+ long_description=read("README.rst"),
+- packages=find_packages(),
++ packages=find_packages(exclude=['tests', 'tests.*']),
+ cmdclass=versioneer.get_cmdclass(),
+ install_requires=parse_requirements(),
+ extras_require={"docker": ["docker"], "salt": ["salt>=3000.1"]},
diff --git a/dev-python/pytest-salt-factories/metadata.xml b/dev-python/pytest-salt-factories/metadata.xml
new file mode 100644
index 00000000000..cee379b1540
--- /dev/null
+++ b/dev-python/pytest-salt-factories/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>chutzpah@gentoo.org</email>
+ <name>Patrick McLean</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-python/pytest-salt-factories/pytest-salt-factories-0.92.0.ebuild b/dev-python/pytest-salt-factories/pytest-salt-factories-0.92.0.ebuild
new file mode 100644
index 00000000000..371c83a76ec
--- /dev/null
+++ b/dev-python/pytest-salt-factories/pytest-salt-factories-0.92.0.ebuild
@@ -0,0 +1,37 @@
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..8} )
+DISTUTILS_USE_SETUPTOOLS=rdepend
+inherit distutils-r1
+
+DESCRIPTION="The new generation of the pytest-salt Plugin"
+HOMEPAGE="https://github.com/saltstack/pytest-salt-factories"
+SRC_URI="https://github.com/saltstack/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+RDEPEND="
+ >=dev-python/pytest-4.6.6[${PYTHON_USEDEP}]
+ dev-python/pytest-tempdir[${PYTHON_USEDEP}]
+ dev-python/psutil[${PYTHON_USEDEP}]
+ dev-python/pyzmq[${PYTHON_USEDEP}]
+ dev-python/msgpack[${PYTHON_USEDEP}]
+"
+BDEPEND="${RDEPEND}
+ test? ( >=app-admin/salt-3000.0[${PYTHON_USEDEP}] )
+"
+
+# pytest just bombs
+RESTRICT="test"
+
+PATCHES=(
+ "${FILESDIR}/pytest-salt-factories-0.92.0-setup.patch"
+)
+
+distutils_enable_tests pytest
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/pytest-salt-factories/, dev-python/pytest-salt-factories/files/
@ 2021-02-27 2:32 Patrick McLean
0 siblings, 0 replies; 6+ messages in thread
From: Patrick McLean @ 2021-02-27 2:32 UTC (permalink / raw
To: gentoo-commits
commit: 947012a7f2e38accf2e25117454491554f844a0f
Author: Patrick McLean <patrick.mclean <AT> sony <DOT> com>
AuthorDate: Fri Feb 26 21:31:15 2021 +0000
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Sat Feb 27 02:32:30 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=947012a7
dev-python/pytest-salt-factories-0.121.1: Version bump
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-3.0.15, Repoman-3.0.2
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
dev-python/pytest-salt-factories/Manifest | 2 +-
.../pytest-salt-factories-0.121.1-tests.patch | 294 +++++++++++++++++++++
.../pytest-salt-factories-0.121.1.ebuild | 64 +++++
.../pytest-salt-factories-0.94.4.ebuild | 37 ---
4 files changed, 359 insertions(+), 38 deletions(-)
diff --git a/dev-python/pytest-salt-factories/Manifest b/dev-python/pytest-salt-factories/Manifest
index aa2b8070aeb..810b7bb0d87 100644
--- a/dev-python/pytest-salt-factories/Manifest
+++ b/dev-python/pytest-salt-factories/Manifest
@@ -1 +1 @@
-DIST pytest-salt-factories-0.94.4.tar.gz 117281 BLAKE2B 9b42dbf4329fe2afd875de55e96604896c6f46d3c3736b644466dd5db6091cf5b9b1d2188c0e0a22b4b15a227dfacc7692ea6499aa7f58ce6adb9b802f00b1f7 SHA512 5c670aa7dd64441b1bd3a188335a35be00d7406bc8d76f9a1213cc3414061c3dfc51a9319008c29c83fb5abec1d7b677aec76ac4b9c00adcd878ef6da599041a
+DIST pytest-salt-factories-0.121.1.tar.gz 102121 BLAKE2B 92cd5953b11377f1646f01b86a677a50216d16bcb944235a3f04176aecbb005974c415adcbf23cc391aab41b1ee9596984516ab61ecdd8c944d4ce707c39ab00 SHA512 32252695c6e8b17ef17d3330c4b0b38bdce89201d5573b4efa3531a72e826ee1fb26fea3ad0408401dec867cee405f21031804c32eb8fe6ceaa00925b17725a1
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
new file mode 100644
index 00000000000..3e85580c915
--- /dev/null
+++ b/dev-python/pytest-salt-factories/files/pytest-salt-factories-0.121.1-tests.patch
@@ -0,0 +1,294 @@
+diff --git a/saltfactories/plugin.py b/saltfactories/plugin.py
+index b29a115..9d68c34 100644
+--- a/saltfactories/plugin.py
++++ b/saltfactories/plugin.py
+@@ -21,7 +21,7 @@ def pytest_tempdir_temproot():
+ tempdir = os.environ.get("TMPDIR") or tempfile.gettempdir()
+ else:
+ tempdir = "/tmp"
+- return os.path.abspath(os.path.realpath(tempdir))
++ return os.path.abspath(tempdir)
+
+
+ def pytest_tempdir_basename():
+diff --git a/tests/functional/markers/test_requires_network.py b/tests/functional/markers/test_requires_network.py
+index 8b57368..d58f0a1 100644
+--- a/tests/functional/markers/test_requires_network.py
++++ b/tests/functional/markers/test_requires_network.py
+@@ -9,7 +9,10 @@ from unittest import mock
+ from saltfactories.utils import ports
+ from saltfactories.utils import socket
+
++import pytest
+
++
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_has_local_network(testdir):
+ testdir.makepyfile(
+ """
+diff --git a/tests/integration/factories/cli/test_salt.py b/tests/integration/factories/cli/test_salt.py
+index 17fce6c..7bd2789 100644
+--- a/tests/integration/factories/cli/test_salt.py
++++ b/tests/integration/factories/cli/test_salt.py
+@@ -17,6 +17,7 @@ def salt_minion_2(salt_master, salt_minion):
+ yield factory
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_merged_json_out(salt_cli, salt_minion, salt_minion_2):
+ ret = salt_cli.run("test.ping", minion_tgt="*")
+ assert ret.exitcode == 0, ret
+@@ -27,6 +28,7 @@ def test_merged_json_out(salt_cli, salt_minion, salt_minion_2):
+ assert ret.json[salt_minion_2.id] is True
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_merged_json_out_disabled(salt_cli, salt_minion, salt_minion_2):
+ ret = salt_cli.run("test.ping", minion_tgt="*", merge_json_output=False)
+ assert ret.exitcode == 0, ret
+diff --git a/tests/integration/factories/daemons/api/test_api.py b/tests/integration/factories/daemons/api/test_api.py
+index 78b8bb7..e20f28c 100644
+--- a/tests/integration/factories/daemons/api/test_api.py
++++ b/tests/integration/factories/daemons/api/test_api.py
+@@ -23,5 +23,6 @@ def salt_api(master):
+ yield factory
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_api(salt_api):
+ assert salt_api.is_running()
+diff --git a/tests/integration/factories/daemons/api/test_restarts.py b/tests/integration/factories/daemons/api/test_restarts.py
+index a6c5472..dd15c17 100644
+--- a/tests/integration/factories/daemons/api/test_restarts.py
++++ b/tests/integration/factories/daemons/api/test_restarts.py
+@@ -16,6 +16,7 @@ def master(salt_factories):
+ yield factory
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_multiple_start_stops(master):
+ factory = master.get_salt_api_daemon()
+ assert factory.is_running() is False
+diff --git a/tests/integration/factories/daemons/master/test_master.py b/tests/integration/factories/daemons/master/test_master.py
+index 2676dfa..cbf598e 100644
+--- a/tests/integration/factories/daemons/master/test_master.py
++++ b/tests/integration/factories/daemons/master/test_master.py
+@@ -46,10 +46,12 @@ def salt_key(master):
+ return master.get_salt_key_cli()
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_master(master):
+ assert master.is_running()
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_salt_run(master, salt_run):
+ max_open_files_config_value = master.config["max_open_files"]
+ ret = salt_run.run("config.get", "max_open_files")
+@@ -57,6 +59,7 @@ def test_salt_run(master, salt_run):
+ assert ret.json == max_open_files_config_value
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_salt_cp(master, minion, salt_cp, tempfiles):
+ """
+ Test copying a file from the master to the minion
+@@ -98,6 +101,7 @@ def test_salt_cp(master, minion, salt_cp, tempfiles):
+ os.unlink(dest)
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_salt_cp_no_match(master, minion, salt_cp, tempfiles):
+ assert master.is_running()
+ assert minion.is_running()
+@@ -119,6 +123,7 @@ def test_salt_cp_no_match(master, minion, salt_cp, tempfiles):
+ os.unlink(dest)
+
+
++@pytest.mark.skip("not compatible with sandbox")
+ @pytest.mark.skip_on_salt_system_install
+ def test_salt_key(master, minion, minion_3, salt_key):
+ ret = salt_key.run("--list-all")
+diff --git a/tests/integration/factories/daemons/master/test_restarts.py b/tests/integration/factories/daemons/master/test_restarts.py
+index 6a6852d..70415d0 100644
+--- a/tests/integration/factories/daemons/master/test_restarts.py
++++ b/tests/integration/factories/daemons/master/test_restarts.py
+@@ -11,6 +11,7 @@ def master(salt_factories):
+ return factory
+
+
++@pytest.mark.skip("not compatible with network")
+ def test_multiple_start_stops(master):
+ assert master.is_running() is False
+ pid = None
+diff --git a/tests/integration/factories/daemons/minion/test_event_forwarder_engine.py b/tests/integration/factories/daemons/minion/test_event_forwarder_engine.py
+index d63e640..653693e 100644
+--- a/tests/integration/factories/daemons/minion/test_event_forwarder_engine.py
++++ b/tests/integration/factories/daemons/minion/test_event_forwarder_engine.py
+@@ -28,6 +28,7 @@ def salt_call_cli(minion):
+ return minion.get_salt_call_cli()
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_event_listener_engine(minion, salt_call_cli, event_listener):
+ """
+ There are some events which the minion fires internally that never reach the master.
+diff --git a/tests/integration/factories/daemons/minion/test_minion.py b/tests/integration/factories/daemons/minion/test_minion.py
+index 64a3df6..ab82e55 100644
+--- a/tests/integration/factories/daemons/minion/test_minion.py
++++ b/tests/integration/factories/daemons/minion/test_minion.py
+@@ -27,6 +27,7 @@ def salt_call_cli(minion):
+ return minion.get_salt_call_cli()
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_minion(minion, salt_cli):
+ assert minion.is_running()
+ ret = salt_cli.run("test.ping", minion_tgt=minion.id)
+@@ -34,6 +35,7 @@ def test_minion(minion, salt_cli):
+ assert ret.json is True
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_no_match(minion, salt_cli):
+ assert minion.is_running()
+ ret = salt_cli.run("test.ping", minion_tgt="minion-2")
+@@ -41,6 +43,7 @@ def test_no_match(minion, salt_cli):
+ assert not ret.json
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_show_jid(minion, salt_cli):
+ assert minion.is_running()
+ ret = salt_cli.run("--show-jid", "test.ping", minion_tgt=minion.id)
+@@ -48,6 +51,7 @@ def test_show_jid(minion, salt_cli):
+ assert ret.json is True
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_minion_salt_call(minion, salt_call_cli):
+ assert minion.is_running()
+ ret = salt_call_cli.run("test.ping")
+@@ -59,6 +63,7 @@ def test_minion_salt_call(minion, salt_call_cli):
+ assert ret.json is True
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_salt_call_exception_handling_doesnt_timeout(minion, salt_call_cli):
+ ret = salt_call_cli.run(
+ "test.raise_exception", "OSError", "2", "No such file or directory", "/tmp/foo.txt"
+diff --git a/tests/integration/factories/daemons/minion/test_restarts.py b/tests/integration/factories/daemons/minion/test_restarts.py
+index a7d9ae0..8f0401b 100644
+--- a/tests/integration/factories/daemons/minion/test_restarts.py
++++ b/tests/integration/factories/daemons/minion/test_restarts.py
+@@ -10,6 +10,7 @@ def master(salt_factories):
+ yield factory
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_multiple_start_stops(master):
+ factory = master.get_salt_minion_daemon(random_string("minion-"))
+ assert factory.is_running() is False
+diff --git a/tests/integration/factories/daemons/proxy/test_proxy_minion.py b/tests/integration/factories/daemons/proxy/test_proxy_minion.py
+index 3bbca21..2e2fb8b 100644
+--- a/tests/integration/factories/daemons/proxy/test_proxy_minion.py
++++ b/tests/integration/factories/daemons/proxy/test_proxy_minion.py
+@@ -35,6 +35,7 @@ def salt_call_cli(proxy_minion):
+ return proxy_minion.get_salt_call_cli()
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_proxy_minion(proxy_minion, salt_cli):
+ assert proxy_minion.is_running()
+ ret = salt_cli.run("test.ping", minion_tgt=proxy_minion.id)
+@@ -42,6 +43,7 @@ def test_proxy_minion(proxy_minion, salt_cli):
+ assert ret.json is True
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_no_match(proxy_minion, salt_cli):
+ assert proxy_minion.is_running()
+ ret = salt_cli.run("test.ping", minion_tgt="proxy-minion-2")
+@@ -49,6 +51,7 @@ def test_no_match(proxy_minion, salt_cli):
+ assert not ret.json
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_show_jid(proxy_minion, salt_cli):
+ if platform.is_darwin() and sys.version_info[:2] == (3, 7):
+ pytest.skip(
+@@ -61,6 +64,7 @@ def test_show_jid(proxy_minion, salt_cli):
+ assert ret.json is True
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_proxy_minion_salt_call(proxy_minion, salt_call_cli):
+ assert proxy_minion.is_running()
+ ret = salt_call_cli.run("test.ping")
+diff --git a/tests/integration/factories/daemons/proxy/test_restarts.py b/tests/integration/factories/daemons/proxy/test_restarts.py
+index 3101204..28652ff 100644
+--- a/tests/integration/factories/daemons/proxy/test_restarts.py
++++ b/tests/integration/factories/daemons/proxy/test_restarts.py
+@@ -17,6 +17,7 @@ def master(salt_factories):
+ yield factory
+
+
++@pytest.mark.skip("not compatible with sandbox")
+ def test_multiple_start_stops(master):
+ factory = master.get_salt_proxy_minion_daemon(random_string("proxy-minion-"))
+ assert factory.is_running() is False
+diff --git a/tests/integration/factories/daemons/ssh/test_salt_ssh.py b/tests/integration/factories/daemons/ssh/test_salt_ssh.py
+index f58eac4..c3df3de 100644
+--- a/tests/integration/factories/daemons/ssh/test_salt_ssh.py
++++ b/tests/integration/factories/daemons/ssh/test_salt_ssh.py
+@@ -51,6 +51,7 @@ def salt_ssh_cli(sshd, salt_factories, master):
+
+
+ @pytest.mark.skip_on_windows
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_salt_ssh(salt_ssh_cli):
+ ret = salt_ssh_cli.run("--ignore-host-keys", "test.echo", "It Works!", minion_tgt="localhost")
+ assert ret.exitcode == 0
+diff --git a/tests/integration/factories/daemons/sshd/test_sshd.py b/tests/integration/factories/daemons/sshd/test_sshd.py
+index 3b425fc..3e03636 100644
+--- a/tests/integration/factories/daemons/sshd/test_sshd.py
++++ b/tests/integration/factories/daemons/sshd/test_sshd.py
+@@ -5,6 +5,7 @@ import pytest
+
+ @pytest.fixture(scope="module")
+ @pytest.mark.skip_if_binaries_missing("sshd", "ssh-keygen")
++@pytest.mark.skip("not compatible with network-sandbox")
+ def sshd(salt_factories):
+ # Set StrictModes to no because our config directory lives in /tmp and those permissions
+ # are not acceptable by sshd strict paranoia.
+@@ -15,12 +16,14 @@ def sshd(salt_factories):
+
+
+ @pytest.mark.skip_on_windows
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_sshd(sshd):
+ assert sshd.is_running()
+
+
+ @pytest.mark.skip_on_windows
+ @pytest.mark.skip_if_binaries_missing("ssh")
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_connect(sshd):
+ cmd = subprocess.run(
+ [
+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
+index 1aa72dc..c4d079e 100644
+--- a/tests/unit/utils/markers/test_skip_if_no_remote_network.py
++++ b/tests/unit/utils/markers/test_skip_if_no_remote_network.py
+@@ -9,7 +9,10 @@ from unittest import mock
+ import saltfactories.utils.markers as markers
+ from saltfactories.utils import socket
+
++import pytest
+
++
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_has_remote_network():
+ assert markers.skip_if_no_remote_network() is None
+
diff --git a/dev-python/pytest-salt-factories/pytest-salt-factories-0.121.1.ebuild b/dev-python/pytest-salt-factories/pytest-salt-factories-0.121.1.ebuild
new file mode 100644
index 00000000000..480bd6832c7
--- /dev/null
+++ b/dev-python/pytest-salt-factories/pytest-salt-factories-0.121.1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 2020-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..9} )
+inherit distutils-r1
+
+DESCRIPTION="The new generation of the pytest-salt Plugin"
+HOMEPAGE="https://github.com/saltstack/pytest-salt-factories"
+SRC_URI="https://github.com/saltstack/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="test"
+
+RDEPEND="
+ >=dev-python/pytest-6.1.1[${PYTHON_USEDEP}]
+ dev-python/attrs[${PYTHON_USEDEP}]
+ dev-python/pytest-tempdir[${PYTHON_USEDEP}]
+ dev-python/psutil[${PYTHON_USEDEP}]
+ dev-python/pyzmq[${PYTHON_USEDEP}]
+ dev-python/msgpack[${PYTHON_USEDEP}]
+"
+BDEPEND="${RDEPEND}
+ test? ( >=app-admin/salt-3001.0[${PYTHON_USEDEP}] )
+"
+
+PATCHES=(
+ "${FILESDIR}/pytest-salt-factories-0.121.1-tests.patch"
+)
+
+distutils_enable_tests --install pytest
+
+python_prepare_all() {
+ sed -r -e "s:use_scm_version=True:version='${PV}', name='${PN//-/.}':" -i setup.py || die
+ sed -r -e '/(setuptools|setup_requires)/ d' -i setup.cfg || die
+
+ sed -i 's:[tool.setuptools_scm]:[tool.disabled]:' pyproject.toml || die
+ printf '__version__ = "%s"\n' "${PV}" > saltfactories/version.py || die
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ local tempdir
+
+ # ${T} is too long a path for the tests to work
+ tempdir="$(mktemp -du --tmpdir=/tmp salt-XXX)"
+ mkdir "${T}/$(basename "${tempdir}")"
+
+ addwrite "${tempdir}"
+ ln -s "$(realpath --relative-to=/tmp "${T}/$(basename "${tempdir}")")" "${tempdir}" || die
+
+ distutils_install_for_testing --via-root
+
+ (
+ cleanup() { rm -f "${tempdir}" || die; }
+
+ trap cleanup EXIT
+ SHELL="/bin/bash" TMPDIR="${tempdir}" \
+ pytest -vv || die "Tests failed with ${EPYTHON}"
+ )
+}
diff --git a/dev-python/pytest-salt-factories/pytest-salt-factories-0.94.4.ebuild b/dev-python/pytest-salt-factories/pytest-salt-factories-0.94.4.ebuild
deleted file mode 100644
index df0cc88cf7e..00000000000
--- a/dev-python/pytest-salt-factories/pytest-salt-factories-0.94.4.ebuild
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright 2020-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..8} )
-inherit distutils-r1
-
-DESCRIPTION="The new generation of the pytest-salt Plugin"
-HOMEPAGE="https://github.com/saltstack/pytest-salt-factories"
-SRC_URI="https://github.com/saltstack/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~x86"
-IUSE="test"
-
-RDEPEND="
- >=dev-python/pytest-6.1.1[${PYTHON_USEDEP}]
- dev-python/attrs[${PYTHON_USEDEP}]
- dev-python/pytest-tempdir[${PYTHON_USEDEP}]
- dev-python/psutil[${PYTHON_USEDEP}]
- dev-python/pyzmq[${PYTHON_USEDEP}]
- dev-python/msgpack[${PYTHON_USEDEP}]
-"
-BDEPEND="${RDEPEND}
- test? ( >=app-admin/salt-3000.0[${PYTHON_USEDEP}] )
-"
-
-# pytest just bombs
-RESTRICT="test"
-
-PATCHES=(
- "${FILESDIR}/pytest-salt-factories-0.92.0-setup.patch"
-)
-
-distutils_enable_tests pytest
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/pytest-salt-factories/, dev-python/pytest-salt-factories/files/
@ 2021-12-03 23:55 Patrick McLean
0 siblings, 0 replies; 6+ messages in thread
From: Patrick McLean @ 2021-12-03 23:55 UTC (permalink / raw
To: gentoo-commits
commit: 45764ac8a646409692c8adfd6408f5cf5556b8ce
Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 3 22:55:16 2021 +0000
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Fri Dec 3 23:55:23 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=45764ac8
dev-python/pytest-salt-factories: Version bump
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
dev-python/pytest-salt-factories/Manifest | 1 +
.../pytest-salt-factories-0.911.0-tests.patch | 469 +++++++++++++++++++++
.../pytest-salt-factories-0.911.0.ebuild | 70 +++
3 files changed, 540 insertions(+)
diff --git a/dev-python/pytest-salt-factories/Manifest b/dev-python/pytest-salt-factories/Manifest
index 810b7bb0d87c..2a5ad00fdc45 100644
--- a/dev-python/pytest-salt-factories/Manifest
+++ b/dev-python/pytest-salt-factories/Manifest
@@ -1 +1,2 @@
DIST pytest-salt-factories-0.121.1.tar.gz 102121 BLAKE2B 92cd5953b11377f1646f01b86a677a50216d16bcb944235a3f04176aecbb005974c415adcbf23cc391aab41b1ee9596984516ab61ecdd8c944d4ce707c39ab00 SHA512 32252695c6e8b17ef17d3330c4b0b38bdce89201d5573b4efa3531a72e826ee1fb26fea3ad0408401dec867cee405f21031804c32eb8fe6ceaa00925b17725a1
+DIST pytest-salt-factories-0.911.0.tar.gz 161682 BLAKE2B b5a827c9a9acc55c53bc4152b648f96845f513e2d1c8425cbde0862909996a653df4debbf798a3d7461da4fc221acd5fc8e6052e123f3e64e0c8f4345557f141 SHA512 bada21cfe990ccb10b0e298cb05a7f3842d0fe24e2c8664352ae991363d0094dd1ff877adea5fcc0c1040e3f20f82ba616607c595511cade93ebadddd336a26b
diff --git a/dev-python/pytest-salt-factories/files/pytest-salt-factories-0.911.0-tests.patch b/dev-python/pytest-salt-factories/files/pytest-salt-factories-0.911.0-tests.patch
new file mode 100644
index 000000000000..687b6a41b901
--- /dev/null
+++ b/dev-python/pytest-salt-factories/files/pytest-salt-factories-0.911.0-tests.patch
@@ -0,0 +1,469 @@
+diff --git a/src/saltfactories/plugins/__init__.py b/src/saltfactories/plugins/__init__.py
+index 679acad..ea6f23f 100644
+--- a/src/saltfactories/plugins/__init__.py
++++ b/src/saltfactories/plugins/__init__.py
+@@ -27,7 +27,7 @@ def pytest_tempdir_temproot():
+ tempdir = "/tmp"
+ else:
+ tempdir = os.environ.get("TMPDIR") or tempfile.gettempdir()
+- return os.path.abspath(os.path.realpath(tempdir))
++ return tempdir
+
+
+ def pytest_tempdir_basename():
+diff --git a/tests/functional/factories/base/test_salt_daemon_factory.py b/tests/functional/factories/base/test_salt_daemon_factory.py
+index 813e36c..2b2b3d8 100644
+--- a/tests/functional/factories/base/test_salt_daemon_factory.py
++++ b/tests/functional/factories/base/test_salt_daemon_factory.py
+@@ -35,7 +35,7 @@ def test_extra_cli_arguments_after_first_failure(
+ This test asserts that after the first start failure, the extra_cli_arguments_after_first_start_failure
+ arguments are added
+ """
+- output_file = tmp_path.joinpath("output.txt").resolve()
++ output_file = tmp_path.joinpath("output.txt")
+ config = {"conf_file": config_file, "id": master_id}
+ script = tempfiles.makepyfile(
+ r"""
+diff --git a/tests/functional/markers/test_requires_network.py b/tests/functional/markers/test_requires_network.py
+index 0b21ede..70343fb 100644
+--- a/tests/functional/markers/test_requires_network.py
++++ b/tests/functional/markers/test_requires_network.py
+@@ -9,7 +9,9 @@ from unittest import mock
+ from saltfactories.utils import ports
+ from saltfactories.utils import socket
+
++import pytest
+
++@pytest.mark.skip("Incompatible with network-sandbox")
+ def test_has_local_network(pytester):
+ pytester.makepyfile(
+ """
+diff --git a/tests/functional/markers/test_requires_salt_modules.py b/tests/functional/markers/test_requires_salt_modules.py
+index 034d5e6..6e50a22 100644
+--- a/tests/functional/markers/test_requires_salt_modules.py
++++ b/tests/functional/markers/test_requires_salt_modules.py
+@@ -4,9 +4,11 @@
+
+ Test the ``@pytest.mark.requires_salt_modules`` marker
+ """
++import sys
+ import pytest
+
+
++@pytest.mark.skipif(sys.version_info >= (3, 10), reason="test broken on python 3.10")
+ @pytest.mark.parametrize(
+ "modules",
+ [
+@@ -31,6 +33,7 @@ def test_has_required_salt_module(pytester, modules):
+ res.stdout.no_fnmatch_line("*PytestUnknownMarkWarning*")
+
+
++@pytest.mark.skipif(sys.version_info >= (3, 10), reason="test broken on python 3.10")
+ @pytest.mark.parametrize(
+ "modules",
+ [
+@@ -55,6 +58,7 @@ def test_missing_required_salt_module(pytester, modules):
+ res.stdout.no_fnmatch_line("*PytestUnknownMarkWarning*")
+
+
++@pytest.mark.skipif(sys.version_info >= (3, 10), reason="test broken on python 3.10")
+ def test_has_required_custom_salt_module(pytester):
+ pytester.makepyfile(
+ r"""
+diff --git a/tests/functional/markers/test_requires_salt_states.py b/tests/functional/markers/test_requires_salt_states.py
+index 6ec469d..79d9052 100644
+--- a/tests/functional/markers/test_requires_salt_states.py
++++ b/tests/functional/markers/test_requires_salt_states.py
+@@ -4,9 +4,11 @@
+
+ Test the ``@pytest.mark.requires_salt_states`` marker
+ """
++import sys
+ import pytest
+
+
++@pytest.mark.skipif(sys.version_info >= (3, 10), reason="test broken on python 3.10")
+ @pytest.mark.parametrize(
+ "modules",
+ [
+@@ -31,6 +33,7 @@ def test_has_required_salt_state(pytester, modules):
+ res.stdout.no_fnmatch_line("*PytestUnknownMarkWarning*")
+
+
++@pytest.mark.skipif(sys.version_info >= (3, 10), reason="test broken on python 3.10")
+ @pytest.mark.parametrize(
+ "modules",
+ [
+@@ -55,6 +58,7 @@ def test_missing_required_salt_state(pytester, modules):
+ res.stdout.no_fnmatch_line("*PytestUnknownMarkWarning*")
+
+
++@pytest.mark.skipif(sys.version_info >= (3, 10), reason="test broken on python 3.10")
+ def test_has_required_custom_salt_state(pytester):
+ pytester.makepyfile(
+ r"""
+diff --git a/tests/functional/test_sys_info.py b/tests/functional/test_sys_info.py
+index 61963e0..e1e7531 100644
+--- a/tests/functional/test_sys_info.py
++++ b/tests/functional/test_sys_info.py
+@@ -4,9 +4,11 @@
+
+ Tests related to system information reports enabled by the `--sys-info` flag.
+ """
++import sys
+ import pytest
+
+
++@pytest.mark.skipif(sys.version_info >= (3, 10), reason="test broken on python 3.10")
+ @pytest.mark.parametrize("flag", ["--sysinfo", "--sys-info"])
+ def test_sysinfo(pytester, flag):
+ pytester.makepyfile(
+@@ -30,6 +32,7 @@ def test_sysinfo(pytester, flag):
+ )
+
+
++@pytest.mark.skipif(sys.version_info >= (3, 10), reason="test broken on python 3.10")
+ def test_no_sysinfo(pytester):
+ pytester.makepyfile(
+ """
+diff --git a/tests/integration/factories/cli/test_salt.py b/tests/integration/factories/cli/test_salt.py
+index 91babb9..bc9e854 100644
+--- a/tests/integration/factories/cli/test_salt.py
++++ b/tests/integration/factories/cli/test_salt.py
+@@ -17,6 +17,7 @@ def salt_minion_2(salt_master, salt_minion):
+ yield factory
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_merged_json_out(salt_cli, salt_minion, salt_minion_2):
+ ret = salt_cli.run("test.ping", minion_tgt="*")
+ assert ret.exitcode == 0, ret
+@@ -27,6 +28,7 @@ def test_merged_json_out(salt_cli, salt_minion, salt_minion_2):
+ assert ret.json[salt_minion_2.id] is True
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_merged_json_out_disabled(salt_cli, salt_minion, salt_minion_2):
+ ret = salt_cli.run("test.ping", minion_tgt="*", merge_json_output=False)
+ assert ret.exitcode == 0, ret
+diff --git a/tests/integration/factories/daemons/api/test_api.py b/tests/integration/factories/daemons/api/test_api.py
+index 8202585..0e57d98 100644
+--- a/tests/integration/factories/daemons/api/test_api.py
++++ b/tests/integration/factories/daemons/api/test_api.py
+@@ -19,5 +19,6 @@ def salt_api(master):
+ yield factory
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_api(salt_api):
+ assert salt_api.is_running()
+diff --git a/tests/integration/factories/daemons/api/test_restarts.py b/tests/integration/factories/daemons/api/test_restarts.py
+index 7b91c33..7cd633a 100644
+--- a/tests/integration/factories/daemons/api/test_restarts.py
++++ b/tests/integration/factories/daemons/api/test_restarts.py
+@@ -12,6 +12,7 @@ def master(salt_factories):
+ yield factory
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_multiple_start_stops(master):
+ factory = master.salt_api_daemon()
+ assert factory.is_running() is False
+diff --git a/tests/integration/factories/daemons/master/test_master.py b/tests/integration/factories/daemons/master/test_master.py
+index e3c20e4..9be3631 100644
+--- a/tests/integration/factories/daemons/master/test_master.py
++++ b/tests/integration/factories/daemons/master/test_master.py
+@@ -1,4 +1,5 @@
+ import os
++import sys
+ import tempfile
+
+ import pytest
+@@ -51,10 +52,12 @@ def salt_call(minion):
+ return minion.salt_call_cli()
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_master(master):
+ assert master.is_running()
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_salt_run(master, salt_run):
+ max_open_files_config_value = master.config["max_open_files"]
+ ret = salt_run.run("config.get", "max_open_files")
+@@ -62,6 +65,7 @@ def test_salt_run(master, salt_run):
+ assert ret.json == max_open_files_config_value
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_salt_cp(master, minion, salt_cp, tempfiles):
+ """
+ Test copying a file from the master to the minion
+@@ -103,6 +107,7 @@ def test_salt_cp(master, minion, salt_cp, tempfiles):
+ os.unlink(dest)
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_salt_cp_no_match(master, minion, salt_cp, tempfiles):
+ assert master.is_running()
+ assert minion.is_running()
+@@ -124,6 +129,7 @@ def test_salt_cp_no_match(master, minion, salt_cp, tempfiles):
+ os.unlink(dest)
+
+
++@pytest.mark.skip("not compatible with sandbox")
+ @pytest.mark.skip_on_salt_system_install
+ def test_salt_key(master, minion, minion_3, salt_key):
+ ret = salt_key.run("--list-all")
+@@ -138,6 +144,7 @@ def test_salt_key(master, minion, minion_3, salt_key):
+
+ @pytest.mark.skip_on_windows
+ @pytest.mark.skip_on_salt_system_install
++@pytest.mark.skipif(sys.version_info >= (3, 10), reason="test broken on python 3.10")
+ def test_exit_status_unknown_user(salt_factories):
+ master = salt_factories.salt_master_daemon("set-exitcodes", overrides={"user": "unknown-user"})
+ with pytest.raises(FactoryNotStarted) as exc:
+@@ -147,6 +154,7 @@ def test_exit_status_unknown_user(salt_factories):
+ assert "The user is not available." in exc.value.stderr, str(exc.value)
+
+
++@pytest.mark.skip("not compatible with sandbox")
+ def test_state_tree(master, salt_call):
+ sls_contents = """
+ test:
+diff --git a/tests/integration/factories/daemons/master/test_restarts.py b/tests/integration/factories/daemons/master/test_restarts.py
+index 683970a..443dcfb 100644
+--- a/tests/integration/factories/daemons/master/test_restarts.py
++++ b/tests/integration/factories/daemons/master/test_restarts.py
+@@ -11,6 +11,7 @@ def master(salt_factories):
+ return factory
+
+
++@pytest.mark.skip("not compatible with network")
+ def test_multiple_start_stops(master):
+ assert master.is_running() is False
+ pid = None
+diff --git a/tests/integration/factories/daemons/minion/test_event_forwarder_engine.py b/tests/integration/factories/daemons/minion/test_event_forwarder_engine.py
+index 7983e29..ac1085d 100644
+--- a/tests/integration/factories/daemons/minion/test_event_forwarder_engine.py
++++ b/tests/integration/factories/daemons/minion/test_event_forwarder_engine.py
+@@ -28,6 +28,7 @@ def salt_call_cli(minion):
+ return minion.salt_call_cli()
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_event_listener_engine(minion, salt_call_cli, event_listener):
+ """
+ There are some events which the minion fires internally that never reach the master.
+diff --git a/tests/integration/factories/daemons/minion/test_minion.py b/tests/integration/factories/daemons/minion/test_minion.py
+index 8e73efc..4501f9d 100644
+--- a/tests/integration/factories/daemons/minion/test_minion.py
++++ b/tests/integration/factories/daemons/minion/test_minion.py
+@@ -27,6 +27,7 @@ def salt_call_cli(minion):
+ return minion.salt_call_cli()
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_minion(minion, salt_cli):
+ assert minion.is_running()
+ ret = salt_cli.run("test.ping", minion_tgt=minion.id)
+@@ -34,6 +35,7 @@ def test_minion(minion, salt_cli):
+ assert ret.json is True
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_no_match(minion, salt_cli):
+ assert minion.is_running()
+ ret = salt_cli.run("test.ping", minion_tgt="minion-2")
+@@ -41,6 +43,7 @@ def test_no_match(minion, salt_cli):
+ assert not ret.json
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_show_jid(minion, salt_cli):
+ assert minion.is_running()
+ ret = salt_cli.run("--show-jid", "test.ping", minion_tgt=minion.id)
+@@ -48,6 +51,7 @@ def test_show_jid(minion, salt_cli):
+ assert ret.json is True
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_minion_salt_call(minion, salt_call_cli):
+ assert minion.is_running()
+ ret = salt_call_cli.run("test.ping")
+@@ -59,6 +63,7 @@ def test_minion_salt_call(minion, salt_call_cli):
+ assert ret.json is True
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_salt_call_exception_handling_doesnt_timeout(minion, salt_call_cli):
+ ret = salt_call_cli.run(
+ "test.raise_exception", "OSError", "2", "No such file or directory", "/tmp/foo.txt"
+@@ -66,6 +71,7 @@ def test_salt_call_exception_handling_doesnt_timeout(minion, salt_call_cli):
+ assert ret.exitcode == 1, ret
+
+
++@pytest.mark.skip("not compatible with sandbox")
+ def test_state_tree(minion, salt_call_cli):
+ sls_contents = """
+ test:
+diff --git a/tests/integration/factories/daemons/minion/test_restarts.py b/tests/integration/factories/daemons/minion/test_restarts.py
+index ab1f044..4ac417d 100644
+--- a/tests/integration/factories/daemons/minion/test_restarts.py
++++ b/tests/integration/factories/daemons/minion/test_restarts.py
+@@ -10,6 +10,7 @@ def master(salt_factories):
+ yield factory
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_multiple_start_stops(master):
+ factory = master.salt_minion_daemon(random_string("minion-"))
+ assert factory.is_running() is False
+diff --git a/tests/integration/factories/daemons/proxy/test_proxy_minion.py b/tests/integration/factories/daemons/proxy/test_proxy_minion.py
+index 926e6ac..f30c986 100644
+--- a/tests/integration/factories/daemons/proxy/test_proxy_minion.py
++++ b/tests/integration/factories/daemons/proxy/test_proxy_minion.py
+@@ -35,6 +35,7 @@ def salt_call_cli(proxy_minion):
+ return proxy_minion.salt_call_cli()
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_proxy_minion(proxy_minion, salt_cli):
+ assert proxy_minion.is_running()
+ ret = salt_cli.run("test.ping", minion_tgt=proxy_minion.id)
+@@ -42,6 +43,7 @@ def test_proxy_minion(proxy_minion, salt_cli):
+ assert ret.json is True
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_no_match(proxy_minion, salt_cli):
+ assert proxy_minion.is_running()
+ ret = salt_cli.run("test.ping", minion_tgt="proxy-minion-2")
+@@ -49,6 +51,7 @@ def test_no_match(proxy_minion, salt_cli):
+ assert not ret.json
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_show_jid(proxy_minion, salt_cli):
+ if platform.is_darwin() and sys.version_info[:2] == (3, 7):
+ pytest.skip(
+@@ -61,6 +64,7 @@ def test_show_jid(proxy_minion, salt_cli):
+ assert ret.json is True
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_proxy_minion_salt_call(proxy_minion, salt_call_cli):
+ assert proxy_minion.is_running()
+ ret = salt_call_cli.run("test.ping")
+@@ -72,6 +76,7 @@ def test_proxy_minion_salt_call(proxy_minion, salt_call_cli):
+ assert ret.json is True
+
+
++@pytest.mark.skip("not compatible with sandbox")
+ def test_state_tree(proxy_minion, salt_call_cli):
+ sls_contents = """
+ test:
+diff --git a/tests/integration/factories/daemons/proxy/test_restarts.py b/tests/integration/factories/daemons/proxy/test_restarts.py
+index 22ef97d..c781059 100644
+--- a/tests/integration/factories/daemons/proxy/test_restarts.py
++++ b/tests/integration/factories/daemons/proxy/test_restarts.py
+@@ -17,6 +17,7 @@ def master(salt_factories):
+ yield factory
+
+
++@pytest.mark.skip("not compatible with sandbox")
+ def test_multiple_start_stops(master):
+ factory = master.salt_proxy_minion_daemon(random_string("proxy-minion-"))
+ assert factory.is_running() is False
+diff --git a/tests/integration/factories/daemons/ssh/test_salt_ssh.py b/tests/integration/factories/daemons/ssh/test_salt_ssh.py
+index e74471a..a288b6b 100644
+--- a/tests/integration/factories/daemons/ssh/test_salt_ssh.py
++++ b/tests/integration/factories/daemons/ssh/test_salt_ssh.py
+@@ -51,6 +51,7 @@ def salt_ssh_cli(sshd, salt_factories, master):
+
+
+ @pytest.mark.skip_on_windows
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_salt_ssh(salt_ssh_cli):
+ ret = salt_ssh_cli.run("--ignore-host-keys", "test.echo", "It Works!", minion_tgt="localhost")
+ assert ret.exitcode == 0
+diff --git a/tests/integration/factories/daemons/sshd/test_sshd.py b/tests/integration/factories/daemons/sshd/test_sshd.py
+index 3b425fc..3e03636 100644
+--- a/tests/integration/factories/daemons/sshd/test_sshd.py
++++ b/tests/integration/factories/daemons/sshd/test_sshd.py
+@@ -5,6 +5,7 @@ import pytest
+
+ @pytest.fixture(scope="module")
+ @pytest.mark.skip_if_binaries_missing("sshd", "ssh-keygen")
++@pytest.mark.skip("not compatible with network-sandbox")
+ def sshd(salt_factories):
+ # Set StrictModes to no because our config directory lives in /tmp and those permissions
+ # are not acceptable by sshd strict paranoia.
+@@ -15,12 +16,14 @@ def sshd(salt_factories):
+
+
+ @pytest.mark.skip_on_windows
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_sshd(sshd):
+ assert sshd.is_running()
+
+
+ @pytest.mark.skip_on_windows
+ @pytest.mark.skip_if_binaries_missing("ssh")
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_connect(sshd):
+ cmd = subprocess.run(
+ [
+diff --git a/tests/integration/utils/saltext/test_log_handlers.py b/tests/integration/utils/saltext/test_log_handlers.py
+index 96ad66d..118062b 100644
+--- a/tests/integration/utils/saltext/test_log_handlers.py
++++ b/tests/integration/utils/saltext/test_log_handlers.py
+@@ -24,6 +24,7 @@ def salt_cli(master):
+ return master.salt_cli()
+
+
++@pytest.mark.skip("Not compatible with sandbox")
+ def test_logs_forwarded_from_sub_processes(salt_cli, minion, caplog):
+ assert minion.is_running()
+
+diff --git a/tests/scenarios/examples/test_echoext.py b/tests/scenarios/examples/test_echoext.py
+index 3d5ce65..5fd503f 100644
+--- a/tests/scenarios/examples/test_echoext.py
++++ b/tests/scenarios/examples/test_echoext.py
+@@ -1,6 +1,8 @@
+ from saltfactories import CODE_ROOT_DIR
+
++import pytest
+
++@pytest.mark.skip("Incompatible with sandbox")
+ def test_echoext(extension_venv):
+ extension_path = CODE_ROOT_DIR.parent.parent / "examples" / "echo-extension"
+ with extension_venv(extension_path) as venv:
+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
+index 1aa72dc..c4d079e 100644
+--- a/tests/unit/utils/markers/test_skip_if_no_remote_network.py
++++ b/tests/unit/utils/markers/test_skip_if_no_remote_network.py
+@@ -9,7 +9,10 @@ from unittest import mock
+ import saltfactories.utils.markers as markers
+ from saltfactories.utils import socket
+
++import pytest
+
++
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_has_remote_network():
+ assert markers.skip_if_no_remote_network() is None
+
+diff --git a/tests/unit/utils/test_platform.py b/tests/unit/utils/test_platform.py
+index 28dac0c..b28bcbb 100644
+--- a/tests/unit/utils/test_platform.py
++++ b/tests/unit/utils/test_platform.py
+@@ -120,6 +120,7 @@ def test_is_not_aix():
+ assert saltfactories.utils.platform.is_aix() is return_value
+
+
++@pytest.mark.skip("Doesn't work with salt-3004")
+ def test_is_aarch64():
+ return_value = True
+ with mock.patch("sys.platform", "aarch64"):
diff --git a/dev-python/pytest-salt-factories/pytest-salt-factories-0.911.0.ebuild b/dev-python/pytest-salt-factories/pytest-salt-factories-0.911.0.ebuild
new file mode 100644
index 000000000000..4d83c56e8d38
--- /dev/null
+++ b/dev-python/pytest-salt-factories/pytest-salt-factories-0.911.0.ebuild
@@ -0,0 +1,70 @@
+# Copyright 2020-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{7..10} )
+inherit distutils-r1
+
+DESCRIPTION="The new generation of the pytest-salt Plugin"
+HOMEPAGE="https://github.com/saltstack/pytest-salt-factories"
+SRC_URI="https://github.com/saltstack/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+IUSE="test"
+
+RDEPEND="
+ dev-python/attrs[${PYTHON_USEDEP}]
+ dev-python/pytest-tempdir[${PYTHON_USEDEP}]
+ dev-python/psutil[${PYTHON_USEDEP}]
+ >=dev-python/pytest-6.0.0[${PYTHON_USEDEP}]
+ dev-python/pytest-helpers-namespace[${PYTHON_USEDEP}]
+ dev-python/pyzmq[${PYTHON_USEDEP}]
+ dev-python/msgpack[${PYTHON_USEDEP}]
+ >=app-admin/salt-3001.0[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ ${RDEPEND}
+ test? (
+ dev-python/pyfakefs[${PYTHON_USEDEP}]
+ dev-python/pytest-subtests[${PYTHON_USEDEP}]
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}/pytest-salt-factories-0.911.0-tests.patch"
+)
+
+distutils_enable_tests --install pytest
+
+python_prepare_all() {
+ sed -r -e "s:use_scm_version=True:version='${PV}', name='${PN//-/.}':" -i setup.py || die
+ sed -r -e '/(setuptools|setup_requires)/ d' -i setup.cfg || die
+
+ sed -i 's:tool.setuptools_scm:tool.disabled:' pyproject.toml || die
+ printf '__version__ = "%s"\n' "${PV}" > src/saltfactories/version.py || die
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ local tempdir
+
+ # ${T} is too long a path for the tests to work
+ tempdir="$(mktemp -du --tmpdir=/tmp salt-XXX)"
+ mkdir "${T}/$(basename "${tempdir}")"
+
+ addwrite "${tempdir}"
+ ln -s "$(realpath --relative-to=/tmp "${T}/$(basename "${tempdir}")")" "${tempdir}" || die
+
+ distutils_install_for_testing --via-root
+
+ (
+ cleanup() { rm -f "${tempdir}" || die; }
+
+ trap cleanup EXIT
+ env SHELL="/bin/bash" TMPDIR="${tempdir}" \
+ pytest -vv || die "Tests failed with ${EPYTHON}"
+ )
+}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/pytest-salt-factories/, dev-python/pytest-salt-factories/files/
@ 2022-01-03 22:30 Michał Górny
0 siblings, 0 replies; 6+ messages in thread
From: Michał Górny @ 2022-01-03 22:30 UTC (permalink / raw
To: gentoo-commits
commit: 56cf1d56651bdd2b8e952fdc890463312ac2ca16
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 3 22:28:56 2022 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Jan 3 22:29:47 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56cf1d56
dev-python/pytest-salt-factories: Remove old
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/pytest-salt-factories/Manifest | 1 -
.../pytest-salt-factories-0.121.1-tests.patch | 294 ---------------------
.../pytest-salt-factories-0.121.1-r1.ebuild | 63 -----
3 files changed, 358 deletions(-)
diff --git a/dev-python/pytest-salt-factories/Manifest b/dev-python/pytest-salt-factories/Manifest
index 2a5ad00fdc45..65e270229be0 100644
--- a/dev-python/pytest-salt-factories/Manifest
+++ b/dev-python/pytest-salt-factories/Manifest
@@ -1,2 +1 @@
-DIST pytest-salt-factories-0.121.1.tar.gz 102121 BLAKE2B 92cd5953b11377f1646f01b86a677a50216d16bcb944235a3f04176aecbb005974c415adcbf23cc391aab41b1ee9596984516ab61ecdd8c944d4ce707c39ab00 SHA512 32252695c6e8b17ef17d3330c4b0b38bdce89201d5573b4efa3531a72e826ee1fb26fea3ad0408401dec867cee405f21031804c32eb8fe6ceaa00925b17725a1
DIST pytest-salt-factories-0.911.0.tar.gz 161682 BLAKE2B b5a827c9a9acc55c53bc4152b648f96845f513e2d1c8425cbde0862909996a653df4debbf798a3d7461da4fc221acd5fc8e6052e123f3e64e0c8f4345557f141 SHA512 bada21cfe990ccb10b0e298cb05a7f3842d0fe24e2c8664352ae991363d0094dd1ff877adea5fcc0c1040e3f20f82ba616607c595511cade93ebadddd336a26b
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
deleted file mode 100644
index 3e85580c9158..000000000000
--- a/dev-python/pytest-salt-factories/files/pytest-salt-factories-0.121.1-tests.patch
+++ /dev/null
@@ -1,294 +0,0 @@
-diff --git a/saltfactories/plugin.py b/saltfactories/plugin.py
-index b29a115..9d68c34 100644
---- a/saltfactories/plugin.py
-+++ b/saltfactories/plugin.py
-@@ -21,7 +21,7 @@ def pytest_tempdir_temproot():
- tempdir = os.environ.get("TMPDIR") or tempfile.gettempdir()
- else:
- tempdir = "/tmp"
-- return os.path.abspath(os.path.realpath(tempdir))
-+ return os.path.abspath(tempdir)
-
-
- def pytest_tempdir_basename():
-diff --git a/tests/functional/markers/test_requires_network.py b/tests/functional/markers/test_requires_network.py
-index 8b57368..d58f0a1 100644
---- a/tests/functional/markers/test_requires_network.py
-+++ b/tests/functional/markers/test_requires_network.py
-@@ -9,7 +9,10 @@ from unittest import mock
- from saltfactories.utils import ports
- from saltfactories.utils import socket
-
-+import pytest
-
-+
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_has_local_network(testdir):
- testdir.makepyfile(
- """
-diff --git a/tests/integration/factories/cli/test_salt.py b/tests/integration/factories/cli/test_salt.py
-index 17fce6c..7bd2789 100644
---- a/tests/integration/factories/cli/test_salt.py
-+++ b/tests/integration/factories/cli/test_salt.py
-@@ -17,6 +17,7 @@ def salt_minion_2(salt_master, salt_minion):
- yield factory
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_merged_json_out(salt_cli, salt_minion, salt_minion_2):
- ret = salt_cli.run("test.ping", minion_tgt="*")
- assert ret.exitcode == 0, ret
-@@ -27,6 +28,7 @@ def test_merged_json_out(salt_cli, salt_minion, salt_minion_2):
- assert ret.json[salt_minion_2.id] is True
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_merged_json_out_disabled(salt_cli, salt_minion, salt_minion_2):
- ret = salt_cli.run("test.ping", minion_tgt="*", merge_json_output=False)
- assert ret.exitcode == 0, ret
-diff --git a/tests/integration/factories/daemons/api/test_api.py b/tests/integration/factories/daemons/api/test_api.py
-index 78b8bb7..e20f28c 100644
---- a/tests/integration/factories/daemons/api/test_api.py
-+++ b/tests/integration/factories/daemons/api/test_api.py
-@@ -23,5 +23,6 @@ def salt_api(master):
- yield factory
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_api(salt_api):
- assert salt_api.is_running()
-diff --git a/tests/integration/factories/daemons/api/test_restarts.py b/tests/integration/factories/daemons/api/test_restarts.py
-index a6c5472..dd15c17 100644
---- a/tests/integration/factories/daemons/api/test_restarts.py
-+++ b/tests/integration/factories/daemons/api/test_restarts.py
-@@ -16,6 +16,7 @@ def master(salt_factories):
- yield factory
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_multiple_start_stops(master):
- factory = master.get_salt_api_daemon()
- assert factory.is_running() is False
-diff --git a/tests/integration/factories/daemons/master/test_master.py b/tests/integration/factories/daemons/master/test_master.py
-index 2676dfa..cbf598e 100644
---- a/tests/integration/factories/daemons/master/test_master.py
-+++ b/tests/integration/factories/daemons/master/test_master.py
-@@ -46,10 +46,12 @@ def salt_key(master):
- return master.get_salt_key_cli()
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_master(master):
- assert master.is_running()
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_salt_run(master, salt_run):
- max_open_files_config_value = master.config["max_open_files"]
- ret = salt_run.run("config.get", "max_open_files")
-@@ -57,6 +59,7 @@ def test_salt_run(master, salt_run):
- assert ret.json == max_open_files_config_value
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_salt_cp(master, minion, salt_cp, tempfiles):
- """
- Test copying a file from the master to the minion
-@@ -98,6 +101,7 @@ def test_salt_cp(master, minion, salt_cp, tempfiles):
- os.unlink(dest)
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_salt_cp_no_match(master, minion, salt_cp, tempfiles):
- assert master.is_running()
- assert minion.is_running()
-@@ -119,6 +123,7 @@ def test_salt_cp_no_match(master, minion, salt_cp, tempfiles):
- os.unlink(dest)
-
-
-+@pytest.mark.skip("not compatible with sandbox")
- @pytest.mark.skip_on_salt_system_install
- def test_salt_key(master, minion, minion_3, salt_key):
- ret = salt_key.run("--list-all")
-diff --git a/tests/integration/factories/daemons/master/test_restarts.py b/tests/integration/factories/daemons/master/test_restarts.py
-index 6a6852d..70415d0 100644
---- a/tests/integration/factories/daemons/master/test_restarts.py
-+++ b/tests/integration/factories/daemons/master/test_restarts.py
-@@ -11,6 +11,7 @@ def master(salt_factories):
- return factory
-
-
-+@pytest.mark.skip("not compatible with network")
- def test_multiple_start_stops(master):
- assert master.is_running() is False
- pid = None
-diff --git a/tests/integration/factories/daemons/minion/test_event_forwarder_engine.py b/tests/integration/factories/daemons/minion/test_event_forwarder_engine.py
-index d63e640..653693e 100644
---- a/tests/integration/factories/daemons/minion/test_event_forwarder_engine.py
-+++ b/tests/integration/factories/daemons/minion/test_event_forwarder_engine.py
-@@ -28,6 +28,7 @@ def salt_call_cli(minion):
- return minion.get_salt_call_cli()
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_event_listener_engine(minion, salt_call_cli, event_listener):
- """
- There are some events which the minion fires internally that never reach the master.
-diff --git a/tests/integration/factories/daemons/minion/test_minion.py b/tests/integration/factories/daemons/minion/test_minion.py
-index 64a3df6..ab82e55 100644
---- a/tests/integration/factories/daemons/minion/test_minion.py
-+++ b/tests/integration/factories/daemons/minion/test_minion.py
-@@ -27,6 +27,7 @@ def salt_call_cli(minion):
- return minion.get_salt_call_cli()
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_minion(minion, salt_cli):
- assert minion.is_running()
- ret = salt_cli.run("test.ping", minion_tgt=minion.id)
-@@ -34,6 +35,7 @@ def test_minion(minion, salt_cli):
- assert ret.json is True
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_no_match(minion, salt_cli):
- assert minion.is_running()
- ret = salt_cli.run("test.ping", minion_tgt="minion-2")
-@@ -41,6 +43,7 @@ def test_no_match(minion, salt_cli):
- assert not ret.json
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_show_jid(minion, salt_cli):
- assert minion.is_running()
- ret = salt_cli.run("--show-jid", "test.ping", minion_tgt=minion.id)
-@@ -48,6 +51,7 @@ def test_show_jid(minion, salt_cli):
- assert ret.json is True
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_minion_salt_call(minion, salt_call_cli):
- assert minion.is_running()
- ret = salt_call_cli.run("test.ping")
-@@ -59,6 +63,7 @@ def test_minion_salt_call(minion, salt_call_cli):
- assert ret.json is True
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_salt_call_exception_handling_doesnt_timeout(minion, salt_call_cli):
- ret = salt_call_cli.run(
- "test.raise_exception", "OSError", "2", "No such file or directory", "/tmp/foo.txt"
-diff --git a/tests/integration/factories/daemons/minion/test_restarts.py b/tests/integration/factories/daemons/minion/test_restarts.py
-index a7d9ae0..8f0401b 100644
---- a/tests/integration/factories/daemons/minion/test_restarts.py
-+++ b/tests/integration/factories/daemons/minion/test_restarts.py
-@@ -10,6 +10,7 @@ def master(salt_factories):
- yield factory
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_multiple_start_stops(master):
- factory = master.get_salt_minion_daemon(random_string("minion-"))
- assert factory.is_running() is False
-diff --git a/tests/integration/factories/daemons/proxy/test_proxy_minion.py b/tests/integration/factories/daemons/proxy/test_proxy_minion.py
-index 3bbca21..2e2fb8b 100644
---- a/tests/integration/factories/daemons/proxy/test_proxy_minion.py
-+++ b/tests/integration/factories/daemons/proxy/test_proxy_minion.py
-@@ -35,6 +35,7 @@ def salt_call_cli(proxy_minion):
- return proxy_minion.get_salt_call_cli()
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_proxy_minion(proxy_minion, salt_cli):
- assert proxy_minion.is_running()
- ret = salt_cli.run("test.ping", minion_tgt=proxy_minion.id)
-@@ -42,6 +43,7 @@ def test_proxy_minion(proxy_minion, salt_cli):
- assert ret.json is True
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_no_match(proxy_minion, salt_cli):
- assert proxy_minion.is_running()
- ret = salt_cli.run("test.ping", minion_tgt="proxy-minion-2")
-@@ -49,6 +51,7 @@ def test_no_match(proxy_minion, salt_cli):
- assert not ret.json
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_show_jid(proxy_minion, salt_cli):
- if platform.is_darwin() and sys.version_info[:2] == (3, 7):
- pytest.skip(
-@@ -61,6 +64,7 @@ def test_show_jid(proxy_minion, salt_cli):
- assert ret.json is True
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_proxy_minion_salt_call(proxy_minion, salt_call_cli):
- assert proxy_minion.is_running()
- ret = salt_call_cli.run("test.ping")
-diff --git a/tests/integration/factories/daemons/proxy/test_restarts.py b/tests/integration/factories/daemons/proxy/test_restarts.py
-index 3101204..28652ff 100644
---- a/tests/integration/factories/daemons/proxy/test_restarts.py
-+++ b/tests/integration/factories/daemons/proxy/test_restarts.py
-@@ -17,6 +17,7 @@ def master(salt_factories):
- yield factory
-
-
-+@pytest.mark.skip("not compatible with sandbox")
- def test_multiple_start_stops(master):
- factory = master.get_salt_proxy_minion_daemon(random_string("proxy-minion-"))
- assert factory.is_running() is False
-diff --git a/tests/integration/factories/daemons/ssh/test_salt_ssh.py b/tests/integration/factories/daemons/ssh/test_salt_ssh.py
-index f58eac4..c3df3de 100644
---- a/tests/integration/factories/daemons/ssh/test_salt_ssh.py
-+++ b/tests/integration/factories/daemons/ssh/test_salt_ssh.py
-@@ -51,6 +51,7 @@ def salt_ssh_cli(sshd, salt_factories, master):
-
-
- @pytest.mark.skip_on_windows
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_salt_ssh(salt_ssh_cli):
- ret = salt_ssh_cli.run("--ignore-host-keys", "test.echo", "It Works!", minion_tgt="localhost")
- assert ret.exitcode == 0
-diff --git a/tests/integration/factories/daemons/sshd/test_sshd.py b/tests/integration/factories/daemons/sshd/test_sshd.py
-index 3b425fc..3e03636 100644
---- a/tests/integration/factories/daemons/sshd/test_sshd.py
-+++ b/tests/integration/factories/daemons/sshd/test_sshd.py
-@@ -5,6 +5,7 @@ import pytest
-
- @pytest.fixture(scope="module")
- @pytest.mark.skip_if_binaries_missing("sshd", "ssh-keygen")
-+@pytest.mark.skip("not compatible with network-sandbox")
- def sshd(salt_factories):
- # Set StrictModes to no because our config directory lives in /tmp and those permissions
- # are not acceptable by sshd strict paranoia.
-@@ -15,12 +16,14 @@ def sshd(salt_factories):
-
-
- @pytest.mark.skip_on_windows
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_sshd(sshd):
- assert sshd.is_running()
-
-
- @pytest.mark.skip_on_windows
- @pytest.mark.skip_if_binaries_missing("ssh")
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_connect(sshd):
- cmd = subprocess.run(
- [
-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
-index 1aa72dc..c4d079e 100644
---- a/tests/unit/utils/markers/test_skip_if_no_remote_network.py
-+++ b/tests/unit/utils/markers/test_skip_if_no_remote_network.py
-@@ -9,7 +9,10 @@ from unittest import mock
- import saltfactories.utils.markers as markers
- from saltfactories.utils import socket
-
-+import pytest
-
-+
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_has_remote_network():
- assert markers.skip_if_no_remote_network() is None
-
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
deleted file mode 100644
index e4d2f0f1ee31..000000000000
--- a/dev-python/pytest-salt-factories/pytest-salt-factories-0.121.1-r1.ebuild
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright 2020-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..9} )
-inherit distutils-r1
-
-DESCRIPTION="The new generation of the pytest-salt Plugin"
-HOMEPAGE="https://github.com/saltstack/pytest-salt-factories"
-SRC_URI="https://github.com/saltstack/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="amd64 ~arm ~arm64 x86"
-IUSE="test"
-
-RDEPEND="
- >=dev-python/pytest-6.1.1[${PYTHON_USEDEP}]
- dev-python/attrs[${PYTHON_USEDEP}]
- dev-python/pytest-tempdir[${PYTHON_USEDEP}]
- dev-python/psutil[${PYTHON_USEDEP}]
- dev-python/pyzmq[${PYTHON_USEDEP}]
- dev-python/msgpack[${PYTHON_USEDEP}]
- >=app-admin/salt-3001.0[${PYTHON_USEDEP}]
-"
-BDEPEND="${RDEPEND}"
-
-PATCHES=(
- "${FILESDIR}/pytest-salt-factories-0.121.1-tests.patch"
-)
-
-distutils_enable_tests --install pytest
-
-python_prepare_all() {
- sed -r -e "s:use_scm_version=True:version='${PV}', name='${PN//-/.}':" -i setup.py || die
- sed -r -e '/(setuptools|setup_requires)/ d' -i setup.cfg || die
-
- sed -i 's:tool.setuptools_scm:tool.disabled:' pyproject.toml || die
- printf '__version__ = "%s"\n' "${PV}" > saltfactories/version.py || die
- distutils-r1_python_prepare_all
-}
-
-python_test() {
- local tempdir
-
- # ${T} is too long a path for the tests to work
- tempdir="$(mktemp -du --tmpdir=/tmp salt-XXX)"
- mkdir "${T}/$(basename "${tempdir}")"
-
- addwrite "${tempdir}"
- ln -s "$(realpath --relative-to=/tmp "${T}/$(basename "${tempdir}")")" "${tempdir}" || die
-
- distutils_install_for_testing --via-root
-
- (
- cleanup() { rm -f "${tempdir}" || die; }
-
- trap cleanup EXIT
- SHELL="/bin/bash" TMPDIR="${tempdir}" \
- pytest -vv || die "Tests failed with ${EPYTHON}"
- )
-}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/pytest-salt-factories/, dev-python/pytest-salt-factories/files/
@ 2022-03-31 2:03 Patrick McLean
0 siblings, 0 replies; 6+ messages in thread
From: Patrick McLean @ 2022-03-31 2:03 UTC (permalink / raw
To: gentoo-commits
commit: f0edbf1a9b61b952675ef782fb785b4a9373ba01
Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 31 01:40:31 2022 +0000
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Thu Mar 31 02:03:20 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f0edbf1a
dev-python/pytest-salt-factories: drop 0.911.0
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
dev-python/pytest-salt-factories/Manifest | 1 -
.../pytest-salt-factories-0.911.0-tests.patch | 469 ---------------------
.../pytest-salt-factories-0.911.0.ebuild | 70 ---
3 files changed, 540 deletions(-)
diff --git a/dev-python/pytest-salt-factories/Manifest b/dev-python/pytest-salt-factories/Manifest
index 05d7a46c3fb7..403aada1ee3e 100644
--- a/dev-python/pytest-salt-factories/Manifest
+++ b/dev-python/pytest-salt-factories/Manifest
@@ -1,3 +1,2 @@
DIST pytest-salt-factories-0.121.1.tar.gz 102121 BLAKE2B 92cd5953b11377f1646f01b86a677a50216d16bcb944235a3f04176aecbb005974c415adcbf23cc391aab41b1ee9596984516ab61ecdd8c944d4ce707c39ab00 SHA512 32252695c6e8b17ef17d3330c4b0b38bdce89201d5573b4efa3531a72e826ee1fb26fea3ad0408401dec867cee405f21031804c32eb8fe6ceaa00925b17725a1
-DIST pytest-salt-factories-0.911.0.tar.gz 161682 BLAKE2B b5a827c9a9acc55c53bc4152b648f96845f513e2d1c8425cbde0862909996a653df4debbf798a3d7461da4fc221acd5fc8e6052e123f3e64e0c8f4345557f141 SHA512 bada21cfe990ccb10b0e298cb05a7f3842d0fe24e2c8664352ae991363d0094dd1ff877adea5fcc0c1040e3f20f82ba616607c595511cade93ebadddd336a26b
DIST pytest-salt-factories-1.0.0_rc13.tar.gz 148418 BLAKE2B 3688f05d137df23266ebc7e999bc3b3a8ec198173b38dc98bd4a1e2655b982a37485278691e970da0be700cee6f609c57933b041a6d8403e75fb197f5d23d5d4 SHA512 f3713410704540ee48b7263973d3a9bf3159fb63e53e5ef5002201aea3fdcf0b4eaf00e1dd1e67d869b42242985d8117a117568d63abf5ad366e247fb3e1d83f
diff --git a/dev-python/pytest-salt-factories/files/pytest-salt-factories-0.911.0-tests.patch b/dev-python/pytest-salt-factories/files/pytest-salt-factories-0.911.0-tests.patch
deleted file mode 100644
index 687b6a41b901..000000000000
--- a/dev-python/pytest-salt-factories/files/pytest-salt-factories-0.911.0-tests.patch
+++ /dev/null
@@ -1,469 +0,0 @@
-diff --git a/src/saltfactories/plugins/__init__.py b/src/saltfactories/plugins/__init__.py
-index 679acad..ea6f23f 100644
---- a/src/saltfactories/plugins/__init__.py
-+++ b/src/saltfactories/plugins/__init__.py
-@@ -27,7 +27,7 @@ def pytest_tempdir_temproot():
- tempdir = "/tmp"
- else:
- tempdir = os.environ.get("TMPDIR") or tempfile.gettempdir()
-- return os.path.abspath(os.path.realpath(tempdir))
-+ return tempdir
-
-
- def pytest_tempdir_basename():
-diff --git a/tests/functional/factories/base/test_salt_daemon_factory.py b/tests/functional/factories/base/test_salt_daemon_factory.py
-index 813e36c..2b2b3d8 100644
---- a/tests/functional/factories/base/test_salt_daemon_factory.py
-+++ b/tests/functional/factories/base/test_salt_daemon_factory.py
-@@ -35,7 +35,7 @@ def test_extra_cli_arguments_after_first_failure(
- This test asserts that after the first start failure, the extra_cli_arguments_after_first_start_failure
- arguments are added
- """
-- output_file = tmp_path.joinpath("output.txt").resolve()
-+ output_file = tmp_path.joinpath("output.txt")
- config = {"conf_file": config_file, "id": master_id}
- script = tempfiles.makepyfile(
- r"""
-diff --git a/tests/functional/markers/test_requires_network.py b/tests/functional/markers/test_requires_network.py
-index 0b21ede..70343fb 100644
---- a/tests/functional/markers/test_requires_network.py
-+++ b/tests/functional/markers/test_requires_network.py
-@@ -9,7 +9,9 @@ from unittest import mock
- from saltfactories.utils import ports
- from saltfactories.utils import socket
-
-+import pytest
-
-+@pytest.mark.skip("Incompatible with network-sandbox")
- def test_has_local_network(pytester):
- pytester.makepyfile(
- """
-diff --git a/tests/functional/markers/test_requires_salt_modules.py b/tests/functional/markers/test_requires_salt_modules.py
-index 034d5e6..6e50a22 100644
---- a/tests/functional/markers/test_requires_salt_modules.py
-+++ b/tests/functional/markers/test_requires_salt_modules.py
-@@ -4,9 +4,11 @@
-
- Test the ``@pytest.mark.requires_salt_modules`` marker
- """
-+import sys
- import pytest
-
-
-+@pytest.mark.skipif(sys.version_info >= (3, 10), reason="test broken on python 3.10")
- @pytest.mark.parametrize(
- "modules",
- [
-@@ -31,6 +33,7 @@ def test_has_required_salt_module(pytester, modules):
- res.stdout.no_fnmatch_line("*PytestUnknownMarkWarning*")
-
-
-+@pytest.mark.skipif(sys.version_info >= (3, 10), reason="test broken on python 3.10")
- @pytest.mark.parametrize(
- "modules",
- [
-@@ -55,6 +58,7 @@ def test_missing_required_salt_module(pytester, modules):
- res.stdout.no_fnmatch_line("*PytestUnknownMarkWarning*")
-
-
-+@pytest.mark.skipif(sys.version_info >= (3, 10), reason="test broken on python 3.10")
- def test_has_required_custom_salt_module(pytester):
- pytester.makepyfile(
- r"""
-diff --git a/tests/functional/markers/test_requires_salt_states.py b/tests/functional/markers/test_requires_salt_states.py
-index 6ec469d..79d9052 100644
---- a/tests/functional/markers/test_requires_salt_states.py
-+++ b/tests/functional/markers/test_requires_salt_states.py
-@@ -4,9 +4,11 @@
-
- Test the ``@pytest.mark.requires_salt_states`` marker
- """
-+import sys
- import pytest
-
-
-+@pytest.mark.skipif(sys.version_info >= (3, 10), reason="test broken on python 3.10")
- @pytest.mark.parametrize(
- "modules",
- [
-@@ -31,6 +33,7 @@ def test_has_required_salt_state(pytester, modules):
- res.stdout.no_fnmatch_line("*PytestUnknownMarkWarning*")
-
-
-+@pytest.mark.skipif(sys.version_info >= (3, 10), reason="test broken on python 3.10")
- @pytest.mark.parametrize(
- "modules",
- [
-@@ -55,6 +58,7 @@ def test_missing_required_salt_state(pytester, modules):
- res.stdout.no_fnmatch_line("*PytestUnknownMarkWarning*")
-
-
-+@pytest.mark.skipif(sys.version_info >= (3, 10), reason="test broken on python 3.10")
- def test_has_required_custom_salt_state(pytester):
- pytester.makepyfile(
- r"""
-diff --git a/tests/functional/test_sys_info.py b/tests/functional/test_sys_info.py
-index 61963e0..e1e7531 100644
---- a/tests/functional/test_sys_info.py
-+++ b/tests/functional/test_sys_info.py
-@@ -4,9 +4,11 @@
-
- Tests related to system information reports enabled by the `--sys-info` flag.
- """
-+import sys
- import pytest
-
-
-+@pytest.mark.skipif(sys.version_info >= (3, 10), reason="test broken on python 3.10")
- @pytest.mark.parametrize("flag", ["--sysinfo", "--sys-info"])
- def test_sysinfo(pytester, flag):
- pytester.makepyfile(
-@@ -30,6 +32,7 @@ def test_sysinfo(pytester, flag):
- )
-
-
-+@pytest.mark.skipif(sys.version_info >= (3, 10), reason="test broken on python 3.10")
- def test_no_sysinfo(pytester):
- pytester.makepyfile(
- """
-diff --git a/tests/integration/factories/cli/test_salt.py b/tests/integration/factories/cli/test_salt.py
-index 91babb9..bc9e854 100644
---- a/tests/integration/factories/cli/test_salt.py
-+++ b/tests/integration/factories/cli/test_salt.py
-@@ -17,6 +17,7 @@ def salt_minion_2(salt_master, salt_minion):
- yield factory
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_merged_json_out(salt_cli, salt_minion, salt_minion_2):
- ret = salt_cli.run("test.ping", minion_tgt="*")
- assert ret.exitcode == 0, ret
-@@ -27,6 +28,7 @@ def test_merged_json_out(salt_cli, salt_minion, salt_minion_2):
- assert ret.json[salt_minion_2.id] is True
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_merged_json_out_disabled(salt_cli, salt_minion, salt_minion_2):
- ret = salt_cli.run("test.ping", minion_tgt="*", merge_json_output=False)
- assert ret.exitcode == 0, ret
-diff --git a/tests/integration/factories/daemons/api/test_api.py b/tests/integration/factories/daemons/api/test_api.py
-index 8202585..0e57d98 100644
---- a/tests/integration/factories/daemons/api/test_api.py
-+++ b/tests/integration/factories/daemons/api/test_api.py
-@@ -19,5 +19,6 @@ def salt_api(master):
- yield factory
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_api(salt_api):
- assert salt_api.is_running()
-diff --git a/tests/integration/factories/daemons/api/test_restarts.py b/tests/integration/factories/daemons/api/test_restarts.py
-index 7b91c33..7cd633a 100644
---- a/tests/integration/factories/daemons/api/test_restarts.py
-+++ b/tests/integration/factories/daemons/api/test_restarts.py
-@@ -12,6 +12,7 @@ def master(salt_factories):
- yield factory
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_multiple_start_stops(master):
- factory = master.salt_api_daemon()
- assert factory.is_running() is False
-diff --git a/tests/integration/factories/daemons/master/test_master.py b/tests/integration/factories/daemons/master/test_master.py
-index e3c20e4..9be3631 100644
---- a/tests/integration/factories/daemons/master/test_master.py
-+++ b/tests/integration/factories/daemons/master/test_master.py
-@@ -1,4 +1,5 @@
- import os
-+import sys
- import tempfile
-
- import pytest
-@@ -51,10 +52,12 @@ def salt_call(minion):
- return minion.salt_call_cli()
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_master(master):
- assert master.is_running()
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_salt_run(master, salt_run):
- max_open_files_config_value = master.config["max_open_files"]
- ret = salt_run.run("config.get", "max_open_files")
-@@ -62,6 +65,7 @@ def test_salt_run(master, salt_run):
- assert ret.json == max_open_files_config_value
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_salt_cp(master, minion, salt_cp, tempfiles):
- """
- Test copying a file from the master to the minion
-@@ -103,6 +107,7 @@ def test_salt_cp(master, minion, salt_cp, tempfiles):
- os.unlink(dest)
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_salt_cp_no_match(master, minion, salt_cp, tempfiles):
- assert master.is_running()
- assert minion.is_running()
-@@ -124,6 +129,7 @@ def test_salt_cp_no_match(master, minion, salt_cp, tempfiles):
- os.unlink(dest)
-
-
-+@pytest.mark.skip("not compatible with sandbox")
- @pytest.mark.skip_on_salt_system_install
- def test_salt_key(master, minion, minion_3, salt_key):
- ret = salt_key.run("--list-all")
-@@ -138,6 +144,7 @@ def test_salt_key(master, minion, minion_3, salt_key):
-
- @pytest.mark.skip_on_windows
- @pytest.mark.skip_on_salt_system_install
-+@pytest.mark.skipif(sys.version_info >= (3, 10), reason="test broken on python 3.10")
- def test_exit_status_unknown_user(salt_factories):
- master = salt_factories.salt_master_daemon("set-exitcodes", overrides={"user": "unknown-user"})
- with pytest.raises(FactoryNotStarted) as exc:
-@@ -147,6 +154,7 @@ def test_exit_status_unknown_user(salt_factories):
- assert "The user is not available." in exc.value.stderr, str(exc.value)
-
-
-+@pytest.mark.skip("not compatible with sandbox")
- def test_state_tree(master, salt_call):
- sls_contents = """
- test:
-diff --git a/tests/integration/factories/daemons/master/test_restarts.py b/tests/integration/factories/daemons/master/test_restarts.py
-index 683970a..443dcfb 100644
---- a/tests/integration/factories/daemons/master/test_restarts.py
-+++ b/tests/integration/factories/daemons/master/test_restarts.py
-@@ -11,6 +11,7 @@ def master(salt_factories):
- return factory
-
-
-+@pytest.mark.skip("not compatible with network")
- def test_multiple_start_stops(master):
- assert master.is_running() is False
- pid = None
-diff --git a/tests/integration/factories/daemons/minion/test_event_forwarder_engine.py b/tests/integration/factories/daemons/minion/test_event_forwarder_engine.py
-index 7983e29..ac1085d 100644
---- a/tests/integration/factories/daemons/minion/test_event_forwarder_engine.py
-+++ b/tests/integration/factories/daemons/minion/test_event_forwarder_engine.py
-@@ -28,6 +28,7 @@ def salt_call_cli(minion):
- return minion.salt_call_cli()
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_event_listener_engine(minion, salt_call_cli, event_listener):
- """
- There are some events which the minion fires internally that never reach the master.
-diff --git a/tests/integration/factories/daemons/minion/test_minion.py b/tests/integration/factories/daemons/minion/test_minion.py
-index 8e73efc..4501f9d 100644
---- a/tests/integration/factories/daemons/minion/test_minion.py
-+++ b/tests/integration/factories/daemons/minion/test_minion.py
-@@ -27,6 +27,7 @@ def salt_call_cli(minion):
- return minion.salt_call_cli()
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_minion(minion, salt_cli):
- assert minion.is_running()
- ret = salt_cli.run("test.ping", minion_tgt=minion.id)
-@@ -34,6 +35,7 @@ def test_minion(minion, salt_cli):
- assert ret.json is True
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_no_match(minion, salt_cli):
- assert minion.is_running()
- ret = salt_cli.run("test.ping", minion_tgt="minion-2")
-@@ -41,6 +43,7 @@ def test_no_match(minion, salt_cli):
- assert not ret.json
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_show_jid(minion, salt_cli):
- assert minion.is_running()
- ret = salt_cli.run("--show-jid", "test.ping", minion_tgt=minion.id)
-@@ -48,6 +51,7 @@ def test_show_jid(minion, salt_cli):
- assert ret.json is True
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_minion_salt_call(minion, salt_call_cli):
- assert minion.is_running()
- ret = salt_call_cli.run("test.ping")
-@@ -59,6 +63,7 @@ def test_minion_salt_call(minion, salt_call_cli):
- assert ret.json is True
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_salt_call_exception_handling_doesnt_timeout(minion, salt_call_cli):
- ret = salt_call_cli.run(
- "test.raise_exception", "OSError", "2", "No such file or directory", "/tmp/foo.txt"
-@@ -66,6 +71,7 @@ def test_salt_call_exception_handling_doesnt_timeout(minion, salt_call_cli):
- assert ret.exitcode == 1, ret
-
-
-+@pytest.mark.skip("not compatible with sandbox")
- def test_state_tree(minion, salt_call_cli):
- sls_contents = """
- test:
-diff --git a/tests/integration/factories/daemons/minion/test_restarts.py b/tests/integration/factories/daemons/minion/test_restarts.py
-index ab1f044..4ac417d 100644
---- a/tests/integration/factories/daemons/minion/test_restarts.py
-+++ b/tests/integration/factories/daemons/minion/test_restarts.py
-@@ -10,6 +10,7 @@ def master(salt_factories):
- yield factory
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_multiple_start_stops(master):
- factory = master.salt_minion_daemon(random_string("minion-"))
- assert factory.is_running() is False
-diff --git a/tests/integration/factories/daemons/proxy/test_proxy_minion.py b/tests/integration/factories/daemons/proxy/test_proxy_minion.py
-index 926e6ac..f30c986 100644
---- a/tests/integration/factories/daemons/proxy/test_proxy_minion.py
-+++ b/tests/integration/factories/daemons/proxy/test_proxy_minion.py
-@@ -35,6 +35,7 @@ def salt_call_cli(proxy_minion):
- return proxy_minion.salt_call_cli()
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_proxy_minion(proxy_minion, salt_cli):
- assert proxy_minion.is_running()
- ret = salt_cli.run("test.ping", minion_tgt=proxy_minion.id)
-@@ -42,6 +43,7 @@ def test_proxy_minion(proxy_minion, salt_cli):
- assert ret.json is True
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_no_match(proxy_minion, salt_cli):
- assert proxy_minion.is_running()
- ret = salt_cli.run("test.ping", minion_tgt="proxy-minion-2")
-@@ -49,6 +51,7 @@ def test_no_match(proxy_minion, salt_cli):
- assert not ret.json
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_show_jid(proxy_minion, salt_cli):
- if platform.is_darwin() and sys.version_info[:2] == (3, 7):
- pytest.skip(
-@@ -61,6 +64,7 @@ def test_show_jid(proxy_minion, salt_cli):
- assert ret.json is True
-
-
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_proxy_minion_salt_call(proxy_minion, salt_call_cli):
- assert proxy_minion.is_running()
- ret = salt_call_cli.run("test.ping")
-@@ -72,6 +76,7 @@ def test_proxy_minion_salt_call(proxy_minion, salt_call_cli):
- assert ret.json is True
-
-
-+@pytest.mark.skip("not compatible with sandbox")
- def test_state_tree(proxy_minion, salt_call_cli):
- sls_contents = """
- test:
-diff --git a/tests/integration/factories/daemons/proxy/test_restarts.py b/tests/integration/factories/daemons/proxy/test_restarts.py
-index 22ef97d..c781059 100644
---- a/tests/integration/factories/daemons/proxy/test_restarts.py
-+++ b/tests/integration/factories/daemons/proxy/test_restarts.py
-@@ -17,6 +17,7 @@ def master(salt_factories):
- yield factory
-
-
-+@pytest.mark.skip("not compatible with sandbox")
- def test_multiple_start_stops(master):
- factory = master.salt_proxy_minion_daemon(random_string("proxy-minion-"))
- assert factory.is_running() is False
-diff --git a/tests/integration/factories/daemons/ssh/test_salt_ssh.py b/tests/integration/factories/daemons/ssh/test_salt_ssh.py
-index e74471a..a288b6b 100644
---- a/tests/integration/factories/daemons/ssh/test_salt_ssh.py
-+++ b/tests/integration/factories/daemons/ssh/test_salt_ssh.py
-@@ -51,6 +51,7 @@ def salt_ssh_cli(sshd, salt_factories, master):
-
-
- @pytest.mark.skip_on_windows
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_salt_ssh(salt_ssh_cli):
- ret = salt_ssh_cli.run("--ignore-host-keys", "test.echo", "It Works!", minion_tgt="localhost")
- assert ret.exitcode == 0
-diff --git a/tests/integration/factories/daemons/sshd/test_sshd.py b/tests/integration/factories/daemons/sshd/test_sshd.py
-index 3b425fc..3e03636 100644
---- a/tests/integration/factories/daemons/sshd/test_sshd.py
-+++ b/tests/integration/factories/daemons/sshd/test_sshd.py
-@@ -5,6 +5,7 @@ import pytest
-
- @pytest.fixture(scope="module")
- @pytest.mark.skip_if_binaries_missing("sshd", "ssh-keygen")
-+@pytest.mark.skip("not compatible with network-sandbox")
- def sshd(salt_factories):
- # Set StrictModes to no because our config directory lives in /tmp and those permissions
- # are not acceptable by sshd strict paranoia.
-@@ -15,12 +16,14 @@ def sshd(salt_factories):
-
-
- @pytest.mark.skip_on_windows
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_sshd(sshd):
- assert sshd.is_running()
-
-
- @pytest.mark.skip_on_windows
- @pytest.mark.skip_if_binaries_missing("ssh")
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_connect(sshd):
- cmd = subprocess.run(
- [
-diff --git a/tests/integration/utils/saltext/test_log_handlers.py b/tests/integration/utils/saltext/test_log_handlers.py
-index 96ad66d..118062b 100644
---- a/tests/integration/utils/saltext/test_log_handlers.py
-+++ b/tests/integration/utils/saltext/test_log_handlers.py
-@@ -24,6 +24,7 @@ def salt_cli(master):
- return master.salt_cli()
-
-
-+@pytest.mark.skip("Not compatible with sandbox")
- def test_logs_forwarded_from_sub_processes(salt_cli, minion, caplog):
- assert minion.is_running()
-
-diff --git a/tests/scenarios/examples/test_echoext.py b/tests/scenarios/examples/test_echoext.py
-index 3d5ce65..5fd503f 100644
---- a/tests/scenarios/examples/test_echoext.py
-+++ b/tests/scenarios/examples/test_echoext.py
-@@ -1,6 +1,8 @@
- from saltfactories import CODE_ROOT_DIR
-
-+import pytest
-
-+@pytest.mark.skip("Incompatible with sandbox")
- def test_echoext(extension_venv):
- extension_path = CODE_ROOT_DIR.parent.parent / "examples" / "echo-extension"
- with extension_venv(extension_path) as venv:
-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
-index 1aa72dc..c4d079e 100644
---- a/tests/unit/utils/markers/test_skip_if_no_remote_network.py
-+++ b/tests/unit/utils/markers/test_skip_if_no_remote_network.py
-@@ -9,7 +9,10 @@ from unittest import mock
- import saltfactories.utils.markers as markers
- from saltfactories.utils import socket
-
-+import pytest
-
-+
-+@pytest.mark.skip("not compatible with network-sandbox")
- def test_has_remote_network():
- assert markers.skip_if_no_remote_network() is None
-
-diff --git a/tests/unit/utils/test_platform.py b/tests/unit/utils/test_platform.py
-index 28dac0c..b28bcbb 100644
---- a/tests/unit/utils/test_platform.py
-+++ b/tests/unit/utils/test_platform.py
-@@ -120,6 +120,7 @@ def test_is_not_aix():
- assert saltfactories.utils.platform.is_aix() is return_value
-
-
-+@pytest.mark.skip("Doesn't work with salt-3004")
- def test_is_aarch64():
- return_value = True
- with mock.patch("sys.platform", "aarch64"):
diff --git a/dev-python/pytest-salt-factories/pytest-salt-factories-0.911.0.ebuild b/dev-python/pytest-salt-factories/pytest-salt-factories-0.911.0.ebuild
deleted file mode 100644
index 92e0c7b41f95..000000000000
--- a/dev-python/pytest-salt-factories/pytest-salt-factories-0.911.0.ebuild
+++ /dev/null
@@ -1,70 +0,0 @@
-# Copyright 2020-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{7..9} )
-inherit distutils-r1
-
-DESCRIPTION="The new generation of the pytest-salt Plugin"
-HOMEPAGE="https://github.com/saltstack/pytest-salt-factories"
-SRC_URI="https://github.com/saltstack/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="amd64 ~arm ~arm64 x86"
-IUSE="test"
-
-RDEPEND="
- dev-python/attrs[${PYTHON_USEDEP}]
- dev-python/pytest-tempdir[${PYTHON_USEDEP}]
- dev-python/psutil[${PYTHON_USEDEP}]
- >=dev-python/pytest-6.0.0[${PYTHON_USEDEP}]
- dev-python/pytest-helpers-namespace[${PYTHON_USEDEP}]
- dev-python/pyzmq[${PYTHON_USEDEP}]
- dev-python/msgpack[${PYTHON_USEDEP}]
- >=app-admin/salt-3001.0[${PYTHON_USEDEP}]
-"
-BDEPEND="
- ${RDEPEND}
- test? (
- dev-python/pyfakefs[${PYTHON_USEDEP}]
- dev-python/pytest-subtests[${PYTHON_USEDEP}]
- )
-"
-
-PATCHES=(
- "${FILESDIR}/pytest-salt-factories-0.911.0-tests.patch"
-)
-
-distutils_enable_tests --install pytest
-
-python_prepare_all() {
- sed -r -e "s:use_scm_version=True:version='${PV}', name='${PN//-/.}':" -i setup.py || die
- sed -r -e '/(setuptools|setup_requires)/ d' -i setup.cfg || die
-
- sed -i 's:tool.setuptools_scm:tool.disabled:' pyproject.toml || die
- printf '__version__ = "%s"\n' "${PV}" > src/saltfactories/version.py || die
- distutils-r1_python_prepare_all
-}
-
-python_test() {
- local tempdir
-
- # ${T} is too long a path for the tests to work
- tempdir="$(mktemp -du --tmpdir=/tmp salt-XXX)"
- mkdir "${T}/$(basename "${tempdir}")"
-
- addwrite "${tempdir}"
- ln -s "$(realpath --relative-to=/tmp "${T}/$(basename "${tempdir}")")" "${tempdir}" || die
-
- distutils_install_for_testing --via-root
-
- (
- cleanup() { rm -f "${tempdir}" || die; }
-
- trap cleanup EXIT
- env SHELL="/bin/bash" TMPDIR="${tempdir}" \
- pytest -vv || die "Tests failed with ${EPYTHON}"
- )
-}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/pytest-salt-factories/, dev-python/pytest-salt-factories/files/
@ 2022-08-30 21:09 Patrick McLean
0 siblings, 0 replies; 6+ messages in thread
From: Patrick McLean @ 2022-08-30 21:09 UTC (permalink / raw
To: gentoo-commits
commit: bea1470eaa12f2a025729b3790b6f1604efd8972
Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 30 20:32:25 2022 +0000
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Tue Aug 30 21:09:30 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bea1470e
dev-python/pytest-salt-factories: add 1.0.0_rc20
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
dev-python/pytest-salt-factories/Manifest | 1 +
.../pytest-salt-factories-1.0.0_rc20-tests.patch | 423 +++++++++++++++++++++
.../pytest-salt-factories-1.0.0_rc20.ebuild | 72 ++++
3 files changed, 496 insertions(+)
diff --git a/dev-python/pytest-salt-factories/Manifest b/dev-python/pytest-salt-factories/Manifest
index 403aada1ee3e..a18552b8f1fb 100644
--- a/dev-python/pytest-salt-factories/Manifest
+++ b/dev-python/pytest-salt-factories/Manifest
@@ -1,2 +1,3 @@
DIST pytest-salt-factories-0.121.1.tar.gz 102121 BLAKE2B 92cd5953b11377f1646f01b86a677a50216d16bcb944235a3f04176aecbb005974c415adcbf23cc391aab41b1ee9596984516ab61ecdd8c944d4ce707c39ab00 SHA512 32252695c6e8b17ef17d3330c4b0b38bdce89201d5573b4efa3531a72e826ee1fb26fea3ad0408401dec867cee405f21031804c32eb8fe6ceaa00925b17725a1
DIST pytest-salt-factories-1.0.0_rc13.tar.gz 148418 BLAKE2B 3688f05d137df23266ebc7e999bc3b3a8ec198173b38dc98bd4a1e2655b982a37485278691e970da0be700cee6f609c57933b041a6d8403e75fb197f5d23d5d4 SHA512 f3713410704540ee48b7263973d3a9bf3159fb63e53e5ef5002201aea3fdcf0b4eaf00e1dd1e67d869b42242985d8117a117568d63abf5ad366e247fb3e1d83f
+DIST pytest-salt-factories-1.0.0_rc20.tar.gz 160140 BLAKE2B 7ecd9af695626c465e5776ed218bd92f30a556394cf4af0c2b6fb87c182f8aaf2d8f998358a7eef95fae53c85a6be2d4ed5a6ff191496fcac62a97e25cf19063 SHA512 5677c6638b5dc7f90c01f2c2204e1910c2bf6ea2c10b714173d3443d4c682b5f515ad7881e2ceee66f6eaf619e399d6fa10052604fdc9c5157c58348b63c8f2b
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
new file mode 100644
index 000000000000..cd201af5b9f3
--- /dev/null
+++ b/dev-python/pytest-salt-factories/files/pytest-salt-factories-1.0.0_rc20-tests.patch
@@ -0,0 +1,423 @@
+diff --git a/src/saltfactories/plugins/__init__.py b/src/saltfactories/plugins/__init__.py
+index efb8911..14af8fe 100644
+--- a/src/saltfactories/plugins/__init__.py
++++ b/src/saltfactories/plugins/__init__.py
+@@ -28,7 +28,7 @@ def pytest_tempdir_temproot():
+ tempdir = "/tmp"
+ else:
+ tempdir = os.environ.get("TMPDIR") or tempfile.gettempdir()
+- return os.path.abspath(os.path.realpath(tempdir))
++ return tempdir
+
+
+ def pytest_tempdir_basename():
+diff --git a/tests/functional/factories/base/test_salt_daemon_factory.py b/tests/functional/factories/base/test_salt_daemon_factory.py
+index 70d8d62..260e40c 100644
+--- a/tests/functional/factories/base/test_salt_daemon_factory.py
++++ b/tests/functional/factories/base/test_salt_daemon_factory.py
+@@ -36,7 +36,7 @@ def test_extra_cli_arguments_after_first_failure(
+ This test asserts that after the first start failure, the extra_cli_arguments_after_first_start_failure
+ arguments are added
+ """
+- output_file = tmp_path.joinpath("output.txt").resolve()
++ output_file = tmp_path.joinpath("output.txt")
+ config = {"conf_file": config_file, "id": master_id}
+ script = tempfiles.makepyfile(
+ r"""
+diff --git a/tests/functional/factories/daemons/test_container_factory.py b/tests/functional/factories/daemons/test_container_factory.py
+index d060214..3837074 100644
+--- a/tests/functional/factories/daemons/test_container_factory.py
++++ b/tests/functional/factories/daemons/test_container_factory.py
+@@ -18,6 +18,7 @@ def _connectable_docker_client():
+ pytest.skip("Failed to instantiate a docker client: {}".format(exc))
+
+
++@pytest.mark.skip("Needs network access")
+ @pytest.mark.parametrize("skip_on_pull_failure", [True, False])
+ def test_skip_on_pull_failure(pytester, skip_on_pull_failure):
+ pytester.makepyfile(
+diff --git a/tests/functional/markers/test_requires_salt_modules.py b/tests/functional/markers/test_requires_salt_modules.py
+index 97ed1ec..53ff0dd 100644
+--- a/tests/functional/markers/test_requires_salt_modules.py
++++ b/tests/functional/markers/test_requires_salt_modules.py
+@@ -1,9 +1,11 @@
+ """
+ Test the ``@pytest.mark.requires_salt_modules`` marker.
+ """
++import sys
+ import pytest
+
+
++@pytest.mark.skipif(sys.version_info >= (3, 10), reason="test broken on python 3.10")
+ @pytest.mark.parametrize(
+ "modules",
+ [
+@@ -29,6 +31,7 @@ def test_has_required_salt_module(pytester, modules):
+ res.stdout.no_fnmatch_line("*PytestUnknownMarkWarning*")
+
+
++@pytest.mark.skipif(sys.version_info >= (3, 10), reason="test broken on python 3.10")
+ @pytest.mark.parametrize(
+ "modules",
+ [
+@@ -54,6 +57,7 @@ def test_missing_required_salt_module(pytester, modules):
+ res.stdout.no_fnmatch_line("*PytestUnknownMarkWarning*")
+
+
++@pytest.mark.skipif(sys.version_info >= (3, 10), reason="test broken on python 3.10")
+ def test_has_required_custom_salt_module(pytester):
+ pytester.makepyfile(
+ r"""
+diff --git a/tests/functional/markers/test_requires_salt_states.py b/tests/functional/markers/test_requires_salt_states.py
+index f6d63a9..ec4b431 100644
+--- a/tests/functional/markers/test_requires_salt_states.py
++++ b/tests/functional/markers/test_requires_salt_states.py
+@@ -1,9 +1,11 @@
+ """
+ Test the ``@pytest.mark.requires_salt_states`` marker.
+ """
++import sys
+ import pytest
+
+
++@pytest.mark.skipif(sys.version_info >= (3, 10), reason="test broken on python 3.10")
+ @pytest.mark.parametrize(
+ "modules",
+ [
+@@ -29,6 +31,7 @@ def test_has_required_salt_state(pytester, modules):
+ res.stdout.no_fnmatch_line("*PytestUnknownMarkWarning*")
+
+
++@pytest.mark.skipif(sys.version_info >= (3, 10), reason="test broken on python 3.10")
+ @pytest.mark.parametrize(
+ "modules",
+ [
+@@ -54,6 +57,7 @@ def test_missing_required_salt_state(pytester, modules):
+ res.stdout.no_fnmatch_line("*PytestUnknownMarkWarning*")
+
+
++@pytest.mark.skipif(sys.version_info >= (3, 10), reason="test broken on python 3.10")
+ def test_has_required_custom_salt_state(pytester):
+ pytester.makepyfile(
+ r"""
+diff --git a/tests/functional/test_sys_info.py b/tests/functional/test_sys_info.py
+index c8fbf6e..f18c85d 100644
+--- a/tests/functional/test_sys_info.py
++++ b/tests/functional/test_sys_info.py
+@@ -1,9 +1,11 @@
+ """
+ Tests related to system information reports enabled by the `--sys-info` flag..
+ """
++import sys
+ import pytest
+
+
++@pytest.mark.skipif(sys.version_info >= (3, 10), reason="test broken on python 3.10")
+ @pytest.mark.parametrize("flag", ["--sysinfo", "--sys-info"])
+ def test_sysinfo(pytester, flag):
+ pytester.makepyfile(
+@@ -27,6 +29,7 @@ def test_sysinfo(pytester, flag):
+ )
+
+
++@pytest.mark.skipif(sys.version_info >= (3, 10), reason="test broken on python 3.10")
+ def test_no_sysinfo(pytester):
+ pytester.makepyfile(
+ """
+diff --git a/tests/integration/factories/cli/test_salt.py b/tests/integration/factories/cli/test_salt.py
+index 9c4fdb0..0766fe7 100644
+--- a/tests/integration/factories/cli/test_salt.py
++++ b/tests/integration/factories/cli/test_salt.py
+@@ -14,6 +14,7 @@ def salt_minion_2(salt_master, salt_minion):
+ yield factory
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_merged_json_out(salt_cli, salt_minion, salt_minion_2):
+ ret = salt_cli.run("test.ping", minion_tgt="*")
+ assert ret.returncode == 0, ret
+@@ -24,6 +25,7 @@ def test_merged_json_out(salt_cli, salt_minion, salt_minion_2):
+ assert ret.data[salt_minion_2.id] is True
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_merged_json_out_disabled(salt_cli, salt_minion, salt_minion_2):
+ ret = salt_cli.run("test.ping", minion_tgt="*", merge_json_output=False)
+ assert ret.returncode == 0, ret
+diff --git a/tests/integration/factories/daemons/api/test_api.py b/tests/integration/factories/daemons/api/test_api.py
+index d6fd060..aade16e 100644
+--- a/tests/integration/factories/daemons/api/test_api.py
++++ b/tests/integration/factories/daemons/api/test_api.py
+@@ -19,5 +19,6 @@ def salt_api(master):
+ yield factory
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_api(salt_api):
+ assert salt_api.is_running()
+diff --git a/tests/integration/factories/daemons/api/test_restarts.py b/tests/integration/factories/daemons/api/test_restarts.py
+index bfab01f..0494ebb 100644
+--- a/tests/integration/factories/daemons/api/test_restarts.py
++++ b/tests/integration/factories/daemons/api/test_restarts.py
+@@ -12,6 +12,7 @@ def master(salt_factories):
+ yield factory
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_multiple_start_stops(master):
+ factory = master.salt_api_daemon()
+ assert factory.is_running() is False
+diff --git a/tests/integration/factories/daemons/master/test_master.py b/tests/integration/factories/daemons/master/test_master.py
+index 648781d..cb051c4 100644
+--- a/tests/integration/factories/daemons/master/test_master.py
++++ b/tests/integration/factories/daemons/master/test_master.py
+@@ -1,3 +1,4 @@
++import sys
+ import pytest
+ import salt.defaults.exitcodes
+ from pytestshellutils.exceptions import FactoryNotStarted
+@@ -48,10 +49,12 @@ def salt_call(minion, salt_cli_timeout):
+ return minion.salt_call_cli(timeout=salt_cli_timeout)
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_master(master):
+ assert master.is_running()
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_salt_run(master, salt_run):
+ max_open_files_config_value = master.config["max_open_files"]
+ ret = salt_run.run("config.get", "max_open_files")
+@@ -59,6 +62,7 @@ def test_salt_run(master, salt_run):
+ assert ret.data == max_open_files_config_value
+
+
++@pytest.mark.skip("Needs network access")
+ def test_salt_cp_minion_id_as_first_argument(master, minion, salt_cp, tempfiles, tmp_path):
+ """
+ Test copying a file from the master any minions connected
+@@ -75,6 +79,7 @@ def test_salt_cp_minion_id_as_first_argument(master, minion, salt_cp, tempfiles,
+ assert dest.read_text() == contents
+
+
++@pytest.mark.skip("Needs network access")
+ def test_salt_cp_explicit_minion_tgt(master, minion, salt_cp, tempfiles, tmp_path):
+ """
+ Test copying a file from the master to the minion
+@@ -91,6 +96,7 @@ def test_salt_cp_explicit_minion_tgt(master, minion, salt_cp, tempfiles, tmp_pat
+ assert dest.read_text() == contents
+
+
++@pytest.mark.skip("Needs network access")
+ def test_salt_cp_no_match(master, minion, salt_cp, tempfiles, tmp_path):
+ assert master.is_running()
+ assert minion.is_running()
+diff --git a/tests/integration/factories/daemons/master/test_restarts.py b/tests/integration/factories/daemons/master/test_restarts.py
+index 683970a..443dcfb 100644
+--- a/tests/integration/factories/daemons/master/test_restarts.py
++++ b/tests/integration/factories/daemons/master/test_restarts.py
+@@ -11,6 +11,7 @@ def master(salt_factories):
+ return factory
+
+
++@pytest.mark.skip("not compatible with network")
+ def test_multiple_start_stops(master):
+ assert master.is_running() is False
+ pid = None
+diff --git a/tests/integration/factories/daemons/minion/test_event_forwarder_engine.py b/tests/integration/factories/daemons/minion/test_event_forwarder_engine.py
+index a6c6420..10626cd 100644
+--- a/tests/integration/factories/daemons/minion/test_event_forwarder_engine.py
++++ b/tests/integration/factories/daemons/minion/test_event_forwarder_engine.py
+@@ -28,6 +28,7 @@ def salt_call_cli(minion):
+ return minion.salt_call_cli()
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_event_listener_engine(minion, salt_call_cli, event_listener):
+ """
+ There are some events which the minion fires internally that never reach the master.
+diff --git a/tests/integration/factories/daemons/minion/test_minion.py b/tests/integration/factories/daemons/minion/test_minion.py
+index f2799ce..5e2b06a 100644
+--- a/tests/integration/factories/daemons/minion/test_minion.py
++++ b/tests/integration/factories/daemons/minion/test_minion.py
+@@ -27,6 +27,7 @@ def salt_call_cli(minion, salt_cli_timeout):
+ return minion.salt_call_cli(timeout=salt_cli_timeout)
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_minion(minion, salt_cli):
+ assert minion.is_running()
+ ret = salt_cli.run("test.ping", minion_tgt=minion.id)
+@@ -34,6 +35,7 @@ def test_minion(minion, salt_cli):
+ assert ret.data is True
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_no_match(minion, salt_cli):
+ assert minion.is_running()
+ ret = salt_cli.run("test.ping", minion_tgt="minion-2")
+@@ -41,6 +43,7 @@ def test_no_match(minion, salt_cli):
+ assert not ret.data
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_show_jid(minion, salt_cli):
+ assert minion.is_running()
+ ret = salt_cli.run("--show-jid", "test.ping", minion_tgt=minion.id)
+@@ -48,6 +51,7 @@ def test_show_jid(minion, salt_cli):
+ assert ret.data is True
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_minion_salt_call(minion, salt_call_cli):
+ assert minion.is_running()
+ ret = salt_call_cli.run("test.ping")
+@@ -59,6 +63,7 @@ def test_minion_salt_call(minion, salt_call_cli):
+ assert ret.data is True
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_salt_call_exception_handling_doesnt_timeout(minion, salt_call_cli):
+ ret = salt_call_cli.run(
+ "test.raise_exception", "OSError", "2", "No such file or directory", "/tmp/foo.txt"
+@@ -66,6 +71,7 @@ def test_salt_call_exception_handling_doesnt_timeout(minion, salt_call_cli):
+ assert ret.returncode == 1, ret
+
+
++@pytest.mark.skip("not compatible with sandbox")
+ def test_state_tree(minion, salt_call_cli):
+ sls_contents = """
+ test:
+diff --git a/tests/integration/factories/daemons/minion/test_restarts.py b/tests/integration/factories/daemons/minion/test_restarts.py
+index ab1f044..4ac417d 100644
+--- a/tests/integration/factories/daemons/minion/test_restarts.py
++++ b/tests/integration/factories/daemons/minion/test_restarts.py
+@@ -10,6 +10,7 @@ def master(salt_factories):
+ yield factory
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_multiple_start_stops(master):
+ factory = master.salt_minion_daemon(random_string("minion-"))
+ assert factory.is_running() is False
+diff --git a/tests/integration/factories/daemons/proxy/test_proxy_minion.py b/tests/integration/factories/daemons/proxy/test_proxy_minion.py
+index 579e6f5..e7464ed 100644
+--- a/tests/integration/factories/daemons/proxy/test_proxy_minion.py
++++ b/tests/integration/factories/daemons/proxy/test_proxy_minion.py
+@@ -36,6 +36,7 @@ def salt_call_cli(proxy_minion, salt_cli_timeout):
+ return proxy_minion.salt_call_cli(timeout=salt_cli_timeout)
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_proxy_minion(proxy_minion, salt_cli):
+ assert proxy_minion.is_running()
+ ret = salt_cli.run("test.ping", minion_tgt=proxy_minion.id)
+@@ -43,6 +44,7 @@ def test_proxy_minion(proxy_minion, salt_cli):
+ assert ret.data is True
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_no_match(proxy_minion, salt_cli):
+ assert proxy_minion.is_running()
+ ret = salt_cli.run("test.ping", minion_tgt="proxy-minion-2")
+@@ -50,6 +52,7 @@ def test_no_match(proxy_minion, salt_cli):
+ assert not ret.data
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_show_jid(proxy_minion, salt_cli):
+ if platform.is_darwin() and sys.version_info[:2] == (3, 7):
+ pytest.skip(
+@@ -62,6 +65,7 @@ def test_show_jid(proxy_minion, salt_cli):
+ assert ret.data is True
+
+
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_proxy_minion_salt_call(proxy_minion, salt_call_cli):
+ assert proxy_minion.is_running()
+ ret = salt_call_cli.run("test.ping")
+@@ -73,6 +77,7 @@ def test_proxy_minion_salt_call(proxy_minion, salt_call_cli):
+ assert ret.data is True
+
+
++@pytest.mark.skip("not compatible with sandbox")
+ def test_state_tree(proxy_minion, salt_call_cli):
+ sls_contents = """
+ test:
+diff --git a/tests/integration/factories/daemons/proxy/test_restarts.py b/tests/integration/factories/daemons/proxy/test_restarts.py
+index a243c6d..7758c96 100644
+--- a/tests/integration/factories/daemons/proxy/test_restarts.py
++++ b/tests/integration/factories/daemons/proxy/test_restarts.py
+@@ -16,6 +16,7 @@ def master(salt_factories):
+ yield factory
+
+
++@pytest.mark.skip("not compatible with sandbox")
+ def test_multiple_start_stops(master):
+ factory = master.salt_proxy_minion_daemon(random_string("proxy-minion-"))
+ assert factory.is_running() is False
+diff --git a/tests/integration/factories/daemons/ssh/test_salt_ssh.py b/tests/integration/factories/daemons/ssh/test_salt_ssh.py
+index 832a2d3..a586c4f 100644
+--- a/tests/integration/factories/daemons/ssh/test_salt_ssh.py
++++ b/tests/integration/factories/daemons/ssh/test_salt_ssh.py
+@@ -51,6 +51,7 @@ def salt_ssh_cli(sshd, salt_factories, master):
+
+
+ @pytest.mark.skip_on_windows
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_salt_ssh(salt_ssh_cli):
+ ret = salt_ssh_cli.run("--ignore-host-keys", "test.echo", "It Works!", minion_tgt="localhost")
+ assert ret.returncode == 0
+diff --git a/tests/integration/factories/daemons/sshd/test_sshd.py b/tests/integration/factories/daemons/sshd/test_sshd.py
+index 3b425fc..3e03636 100644
+--- a/tests/integration/factories/daemons/sshd/test_sshd.py
++++ b/tests/integration/factories/daemons/sshd/test_sshd.py
+@@ -5,6 +5,7 @@ import pytest
+
+ @pytest.fixture(scope="module")
+ @pytest.mark.skip_if_binaries_missing("sshd", "ssh-keygen")
++@pytest.mark.skip("not compatible with network-sandbox")
+ def sshd(salt_factories):
+ # Set StrictModes to no because our config directory lives in /tmp and those permissions
+ # are not acceptable by sshd strict paranoia.
+@@ -15,12 +16,14 @@ def sshd(salt_factories):
+
+
+ @pytest.mark.skip_on_windows
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_sshd(sshd):
+ assert sshd.is_running()
+
+
+ @pytest.mark.skip_on_windows
+ @pytest.mark.skip_if_binaries_missing("ssh")
++@pytest.mark.skip("not compatible with network-sandbox")
+ def test_connect(sshd):
+ cmd = subprocess.run(
+ [
+diff --git a/tests/integration/utils/saltext/test_log_handlers.py b/tests/integration/utils/saltext/test_log_handlers.py
+index 6d5b9c0..edc5b5a 100644
+--- a/tests/integration/utils/saltext/test_log_handlers.py
++++ b/tests/integration/utils/saltext/test_log_handlers.py
+@@ -24,6 +24,7 @@ def salt_cli(master):
+ return master.salt_cli()
+
+
++@pytest.mark.skip("Not compatible with sandbox")
+ def test_logs_forwarded_from_sub_processes(salt_cli, minion, caplog):
+ assert minion.is_running()
+
+diff --git a/tests/scenarios/examples/test_echoext.py b/tests/scenarios/examples/test_echoext.py
+index 238a442..d827467 100644
+--- a/tests/scenarios/examples/test_echoext.py
++++ b/tests/scenarios/examples/test_echoext.py
+@@ -1,6 +1,8 @@
+ from saltfactories import CODE_ROOT_DIR
+
++import pytest
+
++@pytest.mark.skip("Incompatible with sandbox")
+ def test_echoext(extension_venv):
+ extension_path = CODE_ROOT_DIR.parent.parent / "examples" / "echo-extension"
+ with extension_venv(extension_path) as venv:
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
new file mode 100644
index 000000000000..58d703cddc93
--- /dev/null
+++ b/dev-python/pytest-salt-factories/pytest-salt-factories-1.0.0_rc20.ebuild
@@ -0,0 +1,72 @@
+# Copyright 2020-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+inherit distutils-r1
+
+DESCRIPTION="The new generation of the pytest-salt Plugin"
+HOMEPAGE="https://github.com/saltstack/pytest-salt-factories"
+SRC_URI="https://github.com/saltstack/${PN}/archive/${PV//_/}.tar.gz -> ${P}.tar.gz"
+S=${WORKDIR}/${PN}-${PV//_/}
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~arm64 ~riscv x86"
+IUSE="test"
+
+RDEPEND="
+ dev-python/attrs[${PYTHON_USEDEP}]
+ dev-python/pytest-tempdir[${PYTHON_USEDEP}]
+ dev-python/psutil[${PYTHON_USEDEP}]
+ >=dev-python/pytest-6.0.0[${PYTHON_USEDEP}]
+ dev-python/pytest-helpers-namespace[${PYTHON_USEDEP}]
+ dev-python/pytest-skip-markers[${PYTHON_USEDEP}]
+ dev-python/pytest-system-statistics[${PYTHON_USEDEP}]
+ >=dev-python/pytest-shell-utilities-1.4.0[${PYTHON_USEDEP}]
+ dev-python/pyzmq[${PYTHON_USEDEP}]
+ dev-python/msgpack[${PYTHON_USEDEP}]
+ dev-python/virtualenv[${PYTHON_USEDEP}]
+ >=app-admin/salt-3001.0[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ ${RDEPEND}
+ test? (
+ dev-python/pyfakefs[${PYTHON_USEDEP}]
+ dev-python/pytest-subtests[${PYTHON_USEDEP}]
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}/pytest-salt-factories-1.0.0_rc20-tests.patch"
+)
+
+distutils_enable_tests --install pytest
+
+python_prepare_all() {
+ sed -r -e "s:use_scm_version=True:version='${PV}', name='${PN//-/.}':" -i setup.py || die
+ sed -r -e '/(setuptools|setup_requires)/ d' -i setup.cfg || die
+
+ sed -i 's:tool.setuptools_scm:tool.disabled:' pyproject.toml || die
+ printf '__version__ = "%s"\n' "${PV}" > src/saltfactories/version.py || die
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ local tempdir
+
+ # ${T} is too long a path for the tests to work
+ tempdir="$(mktemp -du --tmpdir=/tmp salt-XXX)"
+ addwrite "${tempdir}"
+
+ distutils_install_for_testing --via-root
+
+ (
+ cleanup() { rm -rf "${tempdir}" || die; }
+
+ trap cleanup EXIT
+ env SHELL="/bin/bash" TMPDIR="${tempdir}" \
+ pytest -vv -x || die "Tests failed with ${EPYTHON}"
+ )
+}
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-08-30 21:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-27 2:32 [gentoo-commits] repo/gentoo:master commit in: dev-python/pytest-salt-factories/, dev-python/pytest-salt-factories/files/ Patrick McLean
-- strict thread matches above, loose matches on Subject: below --
2022-08-30 21:09 Patrick McLean
2022-03-31 2:03 Patrick McLean
2022-01-03 22:30 Michał Górny
2021-12-03 23:55 Patrick McLean
2020-09-04 1:45 Patrick McLean
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox