From cdd58a0e6121e578abf192c753ba1fe946795193 Mon Sep 17 00:00:00 2001 From: expeehaa <> Date: Sep 16 2022 12:57:01 +0000 Subject: Update molecule to version 3.6.1 / rev 1 via SR 1003894 https://build.opensuse.org/request/show/1003894 by user expeehaa + dimstar_suse Python library for testing Ansible roles --- diff --git a/.files b/.files new file mode 100644 index 0000000..d4a0341 Binary files /dev/null and b/.files differ diff --git a/.meta b/.meta new file mode 100644 index 0000000..8f6f223 --- /dev/null +++ b/.meta @@ -0,0 +1,5 @@ + + + + + diff --git a/.rev b/.rev new file mode 100644 index 0000000..e502f4b --- /dev/null +++ b/.rev @@ -0,0 +1,10 @@ + + + 3504cb7dc771bb0644b9e8e4d0191c8c + 3.6.1 + + dimstar_suse + Python library for testing Ansible roles + 1003894 + + diff --git a/molecule-3.6.1.tar.gz b/molecule-3.6.1.tar.gz new file mode 120000 index 0000000..ca505d9 --- /dev/null +++ b/molecule-3.6.1.tar.gz @@ -0,0 +1 @@ +/ipfs/bafybeibb5itdl2qyqorsnwyuiboaq4msqdpxbel3zzs3ybjssad4k75qcu \ No newline at end of file diff --git a/molecule.changes b/molecule.changes new file mode 100644 index 0000000..8ff74ab --- /dev/null +++ b/molecule.changes @@ -0,0 +1,14 @@ +------------------------------------------------------------------- +Tue Jul 26 21:44:46 UTC 2022 - Lukas Müller + +- Disable tests on Leap. + +------------------------------------------------------------------- +Mon Jun 20 16:27:59 UTC 2022 - Lukas Müller + +- Add patch to skip a broken test in TW with Python 3.10. + +------------------------------------------------------------------- +Thu Apr 28 16:06:03 UTC 2022 - Lukas Müller + +- Create initial package. diff --git a/molecule.spec b/molecule.spec new file mode 100644 index 0000000..4e82f9c --- /dev/null +++ b/molecule.spec @@ -0,0 +1,119 @@ +# +# spec file for package python-molecule +# +# Copyright (c) 2022 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/ +# + + +# Disable tests on Leap due to missing build dependencies. +%if 0%{?suse_version} > 1500 +%bcond_without test +%else +%bcond_with test +%endif + +%define pythons python3 +Name: molecule +Version: 3.6.1 +Release: 0 +Summary: Aids in the development and testing of Ansible roles +License: MIT +URL: https://github.com/ansible-community/molecule +Source: https://files.pythonhosted.org/packages/source/m/molecule/molecule-%{version}.tar.gz +Patch0: skip-broken-test.patch +BuildRequires: python3-rpm-macros +BuildRequires: python3-pip +BuildRequires: python3-wheel +BuildRequires: python3-setuptools +%if %{with test} +BuildRequires: ansible +BuildRequires: python3-pytest +BuildRequires: python3-pytest-mock +BuildRequires: python3-pexpect +BuildRequires: python3-yamllint +BuildRequires: python3-ansible-compat >= 1.0.0 +BuildRequires: python3-Cerberus >= 1.3.2 +BuildRequires: python3-click >= 8.0 +BuildRequires: python3-click-help-colors >= 0.9 +BuildRequires: python3-cookiecutter >= 1.7.3 +BuildRequires: python3-enrich >= 1.2.7 +BuildRequires: python3-filelock +BuildRequires: python3-importlib-metadata +BuildRequires: python3-Jinja2 >= 2.11.3 +BuildRequires: python3-packaging +BuildRequires: python3-paramiko >= 2.5.0 +BuildRequires: python3-pluggy >= 0.7.1 +BuildRequires: python3-PyYAML >= 5.1 +BuildRequires: python3-rich >= 9.5.1 +%endif +BuildRequires: fdupes +Requires: ansible +Requires: python3 +Requires: python3-ansible-compat >= 1.0.0 +Requires: python3-Cerberus >= 1.3.2 +Requires: python3-click >= 8.0 +Requires: python3-click-help-colors >= 0.9 +Requires: python3-cookiecutter >= 1.7.3 +Requires: python3-enrich >= 1.2.7 +Requires: python3-importlib-metadata +Requires: python3-Jinja2 >= 2.11.3 +Requires: python3-packaging +Requires: python3-paramiko >= 2.5.0 +Requires: python3-pluggy >= 0.7.1 +Requires: python3-PyYAML >= 5.1 +Requires: python3-rich >= 9.5.1 +BuildArch: noarch + +%description +Molecule project is designed to aid in the development and testing of +Ansible roles. + +Molecule provides support for testing with multiple instances, operating +systems and distributions, virtualization providers, test frameworks and +testing scenarios. + +%prep +%setup -q -n molecule-%{version} + +%patch0 -p1 + +%build +# On Leap < 15.4, setuptools is too old to support omitting setup.py. +%if 0%{?sle_version} < 150400 +echo 'from setuptools import setup; setup()' > setup.py +%endif +%pyproject_wheel + +%install +%pyproject_install + +sed -i '1{\@^#!/usr/bin/env ansible-playbook@d}' %{buildroot}%{python3_sitelib}/molecule/data/validate-dockerfile.yml +sed -i '1{\@^#!/usr/bin/python@d}' %{buildroot}%{python3_sitelib}/molecule/test/scenarios/verifier/molecule/testinfra-pre-commit/tests/test_testinfra_pre_commit.py + +%fdupes %{buildroot}%{python3_sitelib} + +%check +%if %{with test} +export PATH="%{buildroot}%{_bindir}:$PATH" +%pytest +%endif + +%files +%license LICENSE +%{python3_sitelib}/* +%{_bindir}/molecule +%{_bindir}/mol + +%changelog + diff --git a/skip-broken-test.patch b/skip-broken-test.patch new file mode 100644 index 0000000..303b526 --- /dev/null +++ b/skip-broken-test.patch @@ -0,0 +1,12 @@ +diff --git a/src/molecule/test/functional/test_command.py b/src/molecule/test/functional/test_command.py +index 047064d..9e3bc82 100644 +--- a/src/molecule/test/functional/test_command.py ++++ b/src/molecule/test/functional/test_command.py +@@ -98,6 +98,7 @@ def test_command_converge(scenario_to_test, with_scenario, scenario_name): + assert run_command(cmd).returncode == 0 + + ++@pytest.mark.skip(reason="Broken since default python changed from 3.8 to 3.10.") + @pytest.mark.extensive + @pytest.mark.parametrize( + "scenario_to_test, driver_name, scenario_name",