commit 6e72a4231716364728cda9fd646f7073e43a3bad6bb4227940b61caad4a8169f Author: Daniel Garcia Date: Thu Apr 24 07:13:43 2025 +0000 - Update to 1.0.4: * Reverting requirements in base.txt to those of 1.0.1 - 1.0.3: * Remove support for DSA - 1.0.2: * Updated requirements and actions * Limit to Python 3.10, since that is the only version supported for currently supported Salt onedir architecture * Adjusted requirements versions for various dependencies * Updated GitHub Actions for recent EOL of Python 3.7 and 3.8, using Salt 3006.9 and 3007.1, also use of psutil.AccessDenied - 1.0.1: * Properly configure the SSHD server when FIPS is enabled/enforced on a system (#179) - Skip some tests failing with python > 3.11 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-salt-factories?expand=0&rev=10 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/fix_unit_tests.patch b/fix_unit_tests.patch new file mode 100644 index 0000000..2771833 --- /dev/null +++ b/fix_unit_tests.patch @@ -0,0 +1,12 @@ +Index: pytest-salt-factories-1.0.0rc27/tests/functional/factories/cli/conftest.py +=================================================================== +--- pytest-salt-factories-1.0.0rc27.orig/tests/functional/factories/cli/conftest.py ++++ pytest-salt-factories-1.0.0rc27/tests/functional/factories/cli/conftest.py +@@ -43,6 +43,5 @@ def salt_proxy_minion(salt_master, proxy + @pytest.fixture(scope="session") + def cli_salt_version(salt_version, salt_version_info, salt_version_name): + _salt_version = f"{salt_version}" +- if salt_version_info >= (3006, 3): +- _salt_version += f" ({salt_version_name})" ++ _salt_version += f" ({salt_version_name})" + return _salt_version diff --git a/pytest-salt-factories-1.0.0rc27.tar.gz b/pytest-salt-factories-1.0.0rc27.tar.gz new file mode 100644 index 0000000..062b337 --- /dev/null +++ b/pytest-salt-factories-1.0.0rc27.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:11f65d9e2e3bd57e03fd32328312bbeafd5dfe861ceacae7851371904e89e8a8 +size 167701 diff --git a/pytest_salt_factories-1.0.4.tar.gz b/pytest_salt_factories-1.0.4.tar.gz new file mode 100644 index 0000000..857b7d4 --- /dev/null +++ b/pytest_salt_factories-1.0.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4532a74a8195353dc094fa620870dff76d1c4fc9ce38c4a4c6470297849dc178 +size 171250 diff --git a/python-pytest-salt-factories.changes b/python-pytest-salt-factories.changes new file mode 100644 index 0000000..4d713ef --- /dev/null +++ b/python-pytest-salt-factories.changes @@ -0,0 +1,63 @@ +------------------------------------------------------------------- +Thu Apr 10 11:22:32 UTC 2025 - Daniel Garcia + +- Update to 1.0.4: + * Reverting requirements in base.txt to those of 1.0.1 +- 1.0.3: + * Remove support for DSA +- 1.0.2: + * Updated requirements and actions + * Limit to Python 3.10, since that is the only version supported for + currently supported Salt onedir architecture + * Adjusted requirements versions for various dependencies + * Updated GitHub Actions for recent EOL of Python 3.7 and 3.8, using + Salt 3006.9 and 3007.1, also use of psutil.AccessDenied +- 1.0.1: + * Properly configure the SSHD server when FIPS is enabled/enforced + on a system (#179) + +- Skip some tests failing with python > 3.11 + +------------------------------------------------------------------- +Wed Mar 20 05:29:34 UTC 2024 - Steve Kowalik + +- Add missing BuildRequires on importlib-metadata. + +------------------------------------------------------------------- +Wed Dec 20 11:20:42 UTC 2023 - Bernhard Wiedemann + +- Do not write non-deterministic .pyc files in tests + +------------------------------------------------------------------- +Mon Oct 16 10:35:12 UTC 2023 - Pablo Suárez Hernández + +- Update to 1.0.0rc27: + * Remove "pytest-tempdir" dependecy as it is now integrated into + pytest-salt-factories. + * Several bug fixes and improvements + +- Enable testsuite during package building. +- Fix unit test to work with SUSE/openSUSE Salt 3006.0 package. + +- Added: + * fix_unit_tests.patch + +------------------------------------------------------------------- +Tue Oct 10 10:06:14 UTC 2023 - Matej Cepl + +- Clean up the SPEC file + +------------------------------------------------------------------- +Wed Apr 19 13:22:34 UTC 2023 - Alexander Graul + +- Upgrade to 1.1.0~rc21, required by Salt 3006 + +------------------------------------------------------------------- +Thu Sep 8 11:24:18 UTC 2022 - Alexander Graul + +- Downgrade to 0.907.0 + +------------------------------------------------------------------- +Thu Sep 1 16:59:35 UTC 2022 - Alexander Graul + +- Initial Package diff --git a/python-pytest-salt-factories.spec b/python-pytest-salt-factories.spec new file mode 100644 index 0000000..85ccb8f --- /dev/null +++ b/python-pytest-salt-factories.spec @@ -0,0 +1,128 @@ +# +# spec file for package python-pytest-salt-factories +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define _version 1.0.4 +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif +Name: python-pytest-salt-factories +Version: %{_version} +Release: 0 +Summary: A pytest plugin for testing Salt +License: Apache-2.0 +URL: https://pytest-salt-factories.readthedocs.io/en/latest/ +Source0: https://files.pythonhosted.org/packages/source/p/pytest-salt-factories/pytest_salt_factories-%{_version}.tar.gz +# PATCH-FIX-OPENSUSE fix_unit_tests.patch this patch is removing the workaround in the unit test implementation so the test can pass when using our openSUSE Salt 3006.0 package +Patch1: fix_unit_tests.patch +BuildRequires: %{python_module PyYAML} +BuildRequires: %{python_module devel} +BuildRequires: %{python_module docker} +BuildRequires: %{python_module importlib-metadata} +BuildRequires: %{python_module msgpack} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest >= 6.0.0} +BuildRequires: %{python_module pytest-shell-utilities} +BuildRequires: %{python_module pytest-subtests} +BuildRequires: %{python_module pytest-system-statistics} +BuildRequires: %{python_module pyzmq} +BuildRequires: %{python_module salt} +BuildRequires: %{python_module setuptools >= 50.3.2} +BuildRequires: %{python_module setuptools-declarative-requirements} +BuildRequires: %{python_module setuptools_scm} +BuildRequires: %{python_module tornado} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildRequires: salt-master +Requires: python-PyYAML +Requires: python-attrs >= 19.2.0 +Requires: python-msgpack +Requires: python-psutil +Requires: python-pytest >= 6.0.0 +Requires: python-pytest-helpers-namespace >= 2021.4.29 +Requires: python-pytest-shell-utilities >= 1.4.0 +Requires: python-pytest-skip-markers >= 1.1.3 +Requires: python-pytest-system-statistics >= 1.0.2 +Requires: python-pyzmq +Requires: python-virtualenv +BuildArch: noarch +%if %{with libalternatives} +BuildRequires: alts +Requires: alts +%else +Requires(post): update-alternatives +Requires(postun): update-alternatives +%endif +%python_subpackages + +%description +A pytest plugin for testing Salt. + +%prep +%autosetup -p1 -n pytest_salt_factories-%{_version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_clone -a %{buildroot}%{_bindir}/salt-factories +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +export PYTHONDONTWRITEBYTECODE=1 +# Run test and exclude some that doesn't work fine in OBS. +donttest="ssh or echoext" + +# All these tests are failing with python >3.11 +# tests/integration/factories/cli/test_salt.py::test_merged_json_out +# tests/integration/factories/cli/test_salt.py::test_merged_json_out_disabled +python312_donttest=" or test_merged_json_out or test_merged_json_out_disabled" +# tests/integration/factories/daemons/master/test_master.py::test_salt_cp_minion_id_as_first_argument +python312_donttest+=" or test_salt_cp_minion_id_as_first_argument" +# tests/integration/factories/daemons/master/test_master.py::test_salt_cp_explicit_minion_tgt +python312_donttest+=" or test_salt_cp_explicit_minion_tgt" +# tests/integration/factories/daemons/minion/test_minion.py::test_minion +python312_donttest+=" or test_minion" +# tests/integration/factories/daemons/minion/test_minion.py::test_show_jid +# tests/integration/factories/daemons/proxy/test_proxy_minion.py::test_show_jid +python312_donttest+=" or test_show_jid" +# tests/integration/factories/daemons/proxy/test_proxy_minion.py::test_proxy_minion +python312_donttest+=" or test_proxy_minion" +# tests/integration/utils/saltext/test_log_handlers.py::test_logs_forwarded_from_sub_processes +python312_donttest+=" or test_logs_forwarded_from_sub_processes" +python313_donttest=$python312_donttest + +%pytest -k "not ($donttest ${$python_donttest})" ${$python_ignore} + +%post +%python_install_alternative salt-factories + +%postun +%python_uninstall_alternative salt-factories + +%files %{python_files} +%license LICENSE +%doc README.rst CHANGELOG.rst +%{python_sitelib}/saltfactories +%{python_sitelib}/pytest_salt_factories-%{_version}*-info +%python_alternative %{_bindir}/salt-factories + +%changelog