diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-03-03 10:28:17 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-03-03 10:28:17 +0000 |
commit | d99093fb4bb5652015c06274d64083daa2439e4f (patch) | |
tree | cf61513204d97974179580065e85df5c8009087c /dev-python/pytest-salt-factories | |
parent | 463397cf1e064185110fe57c568d73f99a06f5d1 (diff) |
gentoo resync : 03.03.2021
Diffstat (limited to 'dev-python/pytest-salt-factories')
6 files changed, 363 insertions, 54 deletions
diff --git a/dev-python/pytest-salt-factories/Manifest b/dev-python/pytest-salt-factories/Manifest index 21b6647a877e..95b8ecefb50c 100644 --- a/dev-python/pytest-salt-factories/Manifest +++ b/dev-python/pytest-salt-factories/Manifest @@ -1,4 +1,4 @@ -AUX pytest-salt-factories-0.92.0-setup.patch 507 BLAKE2B 6bc3f42686618d3a450d7e6be327cb8ed91c42dc18965cc4ea7a70cd8695f47ac97a517dcf7e36336512ad76d817194f940472a1c0a87838519bf17a71a428d8 SHA512 c7cadb4239ee5bf9fae9594e6612bf36878a910184ca6d98f58241707163ffe2a830b567b06ba4d7c4f218a88d5b72c3dde4387d224cb250308a1fcfc0c4ee37 -DIST pytest-salt-factories-0.94.4.tar.gz 117281 BLAKE2B 9b42dbf4329fe2afd875de55e96604896c6f46d3c3736b644466dd5db6091cf5b9b1d2188c0e0a22b4b15a227dfacc7692ea6499aa7f58ce6adb9b802f00b1f7 SHA512 5c670aa7dd64441b1bd3a188335a35be00d7406bc8d76f9a1213cc3414061c3dfc51a9319008c29c83fb5abec1d7b677aec76ac4b9c00adcd878ef6da599041a -EBUILD pytest-salt-factories-0.94.4.ebuild 903 BLAKE2B cd6e9994cb4d100eb6def23b2e8d229474aa37c82c22ff237953ce1456d62e026df669a61ba5af6b24b7fe61cf5308d319483b378e7c22dc2645a8f60c94a5a2 SHA512 726156e3981e40d9a258ff7b0e29727cd3c2bd26a9bbb45512b72e1a0bf08f44ef172cdb456110ef39e618295368964304225e2419b94b40751a6c7fb234c2d8 -MISC metadata.xml 333 BLAKE2B fd8789d4c8303669a8770b3b825c7dc3429f703c1d0e0622ae7b4d57e9fc5b73703aa79ec2819af6b60c1df4b6b58ec19e6971867c01486d48c6e7aaa3e3e7a7 SHA512 ffdf1308d023306664b012d94fcf678534595e7a4efed20dd214a0b1d3e39ca827bf61450ec20967a838606adb3a4f67055a12fde227d080c5f426d9321cc7fc +AUX pytest-salt-factories-0.121.1-tests.patch 12284 BLAKE2B 4374c59c530d5e0171763b376ecf883354ada4255943017ac60361309dc5799ef563233474a5fa1756e7193285e46d7186973c8413b558dfcb3408cd42aecb6f SHA512 08ef49871ca4882dcd57a51c99e40fb87267ff07c666c54ba475061fb113f5e985c0c23f586366c33cb00b07bc190b98e6d7bb080004ee8b7c171bdb016f9ef8 +DIST pytest-salt-factories-0.121.1.tar.gz 102121 BLAKE2B 92cd5953b11377f1646f01b86a677a50216d16bcb944235a3f04176aecbb005974c415adcbf23cc391aab41b1ee9596984516ab61ecdd8c944d4ce707c39ab00 SHA512 32252695c6e8b17ef17d3330c4b0b38bdce89201d5573b4efa3531a72e826ee1fb26fea3ad0408401dec867cee405f21031804c32eb8fe6ceaa00925b17725a1 +EBUILD pytest-salt-factories-0.121.1.ebuild 1734 BLAKE2B ae6c0a3bee5b429b9825c5a802aab4e57c08ff965c5c8310f6954144e11bc84e8db95addb96fc6fe3dde5c376ce9505201a4321ab41c07c7cba479e06d1b1b86 SHA512 825446d4931684f4b8ea8ceff89724c72587dca69230b7bc14d953d1d77d9f63d137bf1b1be1e1c68216a18dc0951ad415def713bc124dde476be987c5d9523b +MISC metadata.xml 357 BLAKE2B b94cb0c96e720905214dd706d61a7280f2209def7f2eaedf553d83204ee49fdb4c6f668531bbc39f9bc0ea32a728293d1c7892b6c1eb8f2babb185cd32b5d709 SHA512 ed4155a008f387aad4cbff6a314c5240484901f0bef50a3225b16ae1068ee4e01288b4c3692a9a075785c98140a20d51d17b44504eb77da3436ddefb3c0ce017 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 000000000000..3e85580c9158 --- /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/files/pytest-salt-factories-0.92.0-setup.patch b/dev-python/pytest-salt-factories/files/pytest-salt-factories-0.92.0-setup.patch deleted file mode 100644 index d8d1a915a789..000000000000 --- a/dev-python/pytest-salt-factories/files/pytest-salt-factories-0.92.0-setup.patch +++ /dev/null @@ -1,13 +0,0 @@ -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 index b8b1eaa537d2..66f5d56588c5 100644 --- a/dev-python/pytest-salt-factories/metadata.xml +++ b/dev-python/pytest-salt-factories/metadata.xml @@ -5,6 +5,7 @@ <email>chutzpah@gentoo.org</email> <name>Patrick McLean</name> </maintainer> + <stabilize-allarches/> <upstream> <remote-id type="pypi">pytest-salt-factories</remote-id> </upstream> 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 000000000000..480bd6832c7a --- /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 df0cc88cf7e3..000000000000 --- 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 |