Files
python-pytest-testinfra/python-pytest-testinfra.spec
Matej Cepl 7b6219f9dd - Rename package to the upstream name: python-pytest-testinfra.
- Update to 6.3.0
  * Fix #451 for use with pytest -p no:terminal
  * Add client_version() and server_version() and version() to
    docker module.
- Release 6.2.0
  * Fix #590: Systeminfo doesn't resolve Windows correctly (#592)
  * First implementation of network namespaces in addr module
    (#596)
  * pip check support in PipPackage module (#605)
  * pip refactoring: implementation of installed and version (#606)
  * Allow to specify supervisorctl and supervisord.conf paths
    (#536)
- Release 6.1.0
  * Fix wrong package module on CentOS having dpkg tools installed
    #570 (#575)
  * Deduplicate hosts returned by get_backends() (#572)
  * Use /run/systemd/system/ to detect systemd (fixes #546)
  * Use ssh_args from ansible.cfg
  * Require python >= 3.6
  * Fix ValueError with python 3.8+ when using --nagios option.
- Release 6.0.0
  * Breaking change: testinfra has moved to the
    https://github.com/pytest-dev/ organization. Project on PyPi
    is renamed as pytest-testinfra. A dummy testinfra will make
    the transition, but you should rename to pytest-testinfra in
    your requirements files.
- Add testinfra-parametrize-backends-test.patch in order to be able
  to skip salt backend and still test the rest.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-testinfra?expand=0&rev=3
2021-04-27 11:13:50 +00:00

86 lines
2.9 KiB
RPMSpec

#
# spec file for package python-testinfra
#
# Copyright (c) 2021 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/
#
%{?!python_module:%define python_module() python3-%{**}}
%define skip_python2 1
Name: python-pytest-testinfra
Version: 6.3.0
Release: 0
Summary: Python module to test infrastructures
License: Apache-2.0
Group: Development/Languages/Python
URL: https://github.com/pytest-dev/pytest-testinfra
Source: https://files.pythonhosted.org/packages/source/p/pytest-testinfra/pytest-testinfra-%{version}.tar.gz
# PATCH-FIX-OPENSUSE testinfra-parametrize-backends-test.patch -- make backends deselectable which are not available for testing
Patch1: testinfra-parametrize-backends-test.patch
BuildRequires: %{python_module paramiko}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module pywinrm}
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module tornado}
BuildRequires: ansible
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: python3-salt
Requires: python-pytest
Requires: python-six >= 1.4
Provides: python-testinfra = %{version}-%{release}
Obsoletes: python-testinfra < %{version}-%{release}
BuildArch: noarch
%python_subpackages
%description
With Testinfra, one can write unit tests in Python to test the actual
state of servers configured by managements tools like Salt, Ansible,
Puppet, Chef and so on.
Testinfra is like a Serverspec equivalent in Python, and is written
as a plugin to the Pytest test engine.
%prep
%autosetup -p1 -n pytest-testinfra-%{version}
# register custom markers for test suite in order to avoid warning clutter
sed -i -e '/\[tool:pytest\]/ a markers = \
testinfra_hosts\
destructive' setup.cfg
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}/testinfra
%check
export LANG=en_US.UTF-8
donttest="donttestnonemptyprefix"
%{python_expand # salt is python3 primary flavor only
if [ "${python_flavor}" != "python3" -a "%{$python_provides}" != "python3" ]; then
$python_donttest="or (test_backend_importables and salt)"
fi
}
%pytest -ra -k "not ($donttest ${$python_donttest})" test
%files %{python_files}
%doc CHANGELOG.rst README.rst
%license LICENSE
%{python_sitelib}/*
%changelog