Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package molecule for openSUSE:Factory checked in at 2024-04-12 17:35:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/molecule (Old) and /work/SRC/openSUSE:Factory/.molecule.new.26366 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "molecule" Fri Apr 12 17:35:18 2024 rev:11 rq:1167056 version:24.2.1 Changes: -------- --- /work/SRC/openSUSE:Factory/molecule/molecule.changes 2024-03-22 15:35:25.881610966 +0100 +++ /work/SRC/openSUSE:Factory/.molecule.new.26366/molecule.changes 2024-04-12 17:40:40.088752341 +0200 @@ -1,0 +2,13 @@ +Wed Apr 10 16:45:20 UTC 2024 - Johannes Kastl <[email protected]> + +- update to 24.2.1: + Bugfixes + * Molecule uses ANSIBLE_FILTER_PLUGINS + (#4135 <https://github.com/ansible/molecule/pull/4135>) + * Set ANSIBLE_FORCE_COLOR sooner to fix missing color output in + tmux + (#4145 <https://github.com/ansible/molecule/pull/4145>) + * Fix symlinks creation in ansible provisioneer + (#4134 <https://github.com/ansible/molecule/pull/4134>) + +------------------------------------------------------------------- Old: ---- molecule-24.2.0.tar.gz New: ---- molecule-24.2.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ molecule.spec ++++++ --- /var/tmp/diff_new_pack.8AMPge/_old 2024-04-12 17:40:40.540768988 +0200 +++ /var/tmp/diff_new_pack.8AMPge/_new 2024-04-12 17:40:40.544769135 +0200 @@ -39,7 +39,7 @@ %bcond_without test Name: molecule -Version: 24.2.0 +Version: 24.2.1 Release: 0 Summary: Aids in the development and testing of Ansible roles License: MIT ++++++ molecule-24.2.0.tar.gz -> molecule-24.2.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/molecule-24.2.0/.config/requirements-docs.txt new/molecule-24.2.1/.config/requirements-docs.txt --- old/molecule-24.2.0/.config/requirements-docs.txt 2024-02-08 18:10:44.000000000 +0100 +++ new/molecule-24.2.1/.config/requirements-docs.txt 2024-04-09 16:09:11.000000000 +0200 @@ -1,3 +1,3 @@ -mkdocs-ansible>=24.2.1 +mkdocs-ansible>=24.3.0 pipdeptree>=2.4.0 linkchecker>=10.4.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/molecule-24.2.0/.github/workflows/ack.yml new/molecule-24.2.1/.github/workflows/ack.yml --- old/molecule-24.2.0/.github/workflows/ack.yml 2024-02-08 18:10:44.000000000 +0100 +++ new/molecule-24.2.1/.github/workflows/ack.yml 2024-04-09 16:09:11.000000000 +0200 @@ -12,3 +12,4 @@ jobs: ack: uses: ansible/team-devtools/.github/workflows/ack.yml@main + secrets: inherit diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/molecule-24.2.0/.github/workflows/release.yml new/molecule-24.2.1/.github/workflows/release.yml --- old/molecule-24.2.0/.github/workflows/release.yml 2024-02-08 18:10:44.000000000 +0100 +++ new/molecule-24.2.1/.github/workflows/release.yml 2024-04-09 16:09:11.000000000 +0200 @@ -29,6 +29,6 @@ with: fetch-depth: 0 # needed by setuptools-scm - name: Build dists - run: python -m tox -e pkg + run: python3 -m tox -e pkg - name: Publish to pypi.org uses: pypa/gh-action-pypi-publish@release/v1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/molecule-24.2.0/.github/workflows/tox.yml new/molecule-24.2.1/.github/workflows/tox.yml --- old/molecule-24.2.0/.github/workflows/tox.yml 2024-02-08 18:10:44.000000000 +0100 +++ new/molecule-24.2.1/.github/workflows/tox.yml 2024-04-09 16:09:11.000000000 +0200 @@ -47,7 +47,7 @@ matrix: ${{ fromJson(needs.pre.outputs.matrix) }} env: - PYTEST_REQPASS: 450 + PYTEST_REQPASS: 452 environment: test steps: - uses: actions/checkout@v4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/molecule-24.2.0/.pre-commit-config.yaml new/molecule-24.2.1/.pre-commit-config.yaml --- old/molecule-24.2.0/.pre-commit-config.yaml 2024-02-08 18:10:44.000000000 +0100 +++ new/molecule-24.2.1/.pre-commit-config.yaml 2024-04-09 16:09:11.000000000 +0200 @@ -23,12 +23,12 @@ hooks: - id: codespell - repo: https://github.com/psf/black - rev: 24.1.1 + rev: 24.3.0 hooks: - id: black language_version: python3 - repo: https://github.com/pre-commit/pre-commit-hooks.git - rev: v4.5.0 + rev: v4.6.0 hooks: - id: end-of-file-fixer - id: trailing-whitespace @@ -40,19 +40,19 @@ language_version: python3 - repo: https://github.com/adrienverge/yamllint.git - rev: v1.33.0 + rev: v1.35.1 hooks: - id: yamllint files: \.(yaml|yml)$ types: [file, yaml] entry: yamllint --strict - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.2.0" + rev: "v0.3.5" hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.8.0 + rev: v1.9.0 hooks: - id: mypy # empty args needed in order to match mypy cli behavior @@ -77,7 +77,7 @@ - types-setuptools - wcmatch - repo: https://github.com/pycqa/pylint - rev: v3.0.3 + rev: v3.1.0 hooks: - id: pylint args: @@ -94,6 +94,6 @@ - pytest-testinfra - wcmatch - repo: https://github.com/ansible/ansible-lint - rev: v6.22.2 + rev: v24.2.1 hooks: - id: ansible-lint diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/molecule-24.2.0/PKG-INFO new/molecule-24.2.1/PKG-INFO --- old/molecule-24.2.0/PKG-INFO 2024-02-08 18:10:59.687943700 +0100 +++ new/molecule-24.2.1/PKG-INFO 2024-04-09 16:09:23.988299600 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: molecule -Version: 24.2.0 +Version: 24.2.1 Summary: Molecule aids in the development and testing of Ansible roles Author-email: Ansible by Red Hat <[email protected]> Maintainer-email: Ansible by Red Hat <[email protected]> @@ -44,7 +44,7 @@ Requires-Dist: rich>=9.5.1 Requires-Dist: wcmatch>=8.1.2 Provides-Extra: docs -Requires-Dist: mkdocs-ansible>=24.2.1; extra == "docs" +Requires-Dist: mkdocs-ansible>=24.3.0; extra == "docs" Requires-Dist: pipdeptree>=2.4.0; extra == "docs" Requires-Dist: linkchecker>=10.4.0; extra == "docs" Provides-Extra: test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/molecule-24.2.0/docs/ci.md new/molecule-24.2.1/docs/ci.md --- old/molecule-24.2.0/docs/ci.md 2024-02-08 18:10:44.000000000 +0100 +++ new/molecule-24.2.1/docs/ci.md 2024-04-09 16:09:11.000000000 +0200 @@ -12,6 +12,8 @@ An action to clone a repo as `molecule_demo`, and run `molecule test` in ubuntu. +{% raw %} + ```yaml --- name: Molecule Test @@ -41,6 +43,8 @@ molecule test ``` +{% endraw %} + If you need access to requirements in private repositories, [create a token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) with the required privileges, then define a `GIT_CREDENTIALS` secret for @@ -48,13 +52,17 @@ `https://username:[email protected]/`, and finally add the following step before "Test with molecule". +{% raw %} + ```yaml - name: Setup git credentials uses: fusion-engineering/setup-git-credentials@v2 with: - credentials: ${{secrets.GIT_CREDENTIALS}} + credentials: ${{ secrets.GIT_CREDENTIALS }} ``` +{% endraw %} + ## Travis CI [Travis](https://travis-ci.com/) is a CI platform, which can be used to @@ -189,10 +197,10 @@ inputs: versionSpec: "3.10" - - script: python -m pip install "molecule[lint]" "python-vagrant" "molecule-vagrant" "ansible" + - script: python3 -m pip install "molecule[lint]" "python-vagrant" "molecule-vagrant" "ansible" displayName: Install dependencies - - script: python -m pip install "python-tss-sdk" + - script: python3 -m pip install "python-tss-sdk" displayName: Role-specific dependencies - script: | @@ -327,11 +335,13 @@ of the role root directory. For example : ``` yaml + {% raw %} --- - name: Converge hosts: all roles: - role: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}" + {% endraw %} ``` This is the cleaner of the current choices. See diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/molecule-24.2.0/docs/guides/docker-rootless.md new/molecule-24.2.1/docs/guides/docker-rootless.md --- old/molecule-24.2.0/docs/guides/docker-rootless.md 2024-02-08 18:10:44.000000000 +0100 +++ new/molecule-24.2.1/docs/guides/docker-rootless.md 2024-04-09 16:09:11.000000000 +0200 @@ -17,6 +17,7 @@ instead of `wheel` group. ```docker +{% raw %} # Create `ansible` user with sudo permissions and membership in `DEPLOY_GROUP` # This template gets rendered using `loop: "{{ molecule_yml.platforms }}"`, so # each `item` is an element of platforms list from the molecule.yml file for this scenario. @@ -29,6 +30,7 @@ && usermod -aG ${SUDO_GROUP} ${ANSIBLE_USER} \ && usermod -aG ${DEPLOY_GROUP} ${ANSIBLE_USER} \ && sed -i "/^%${SUDO_GROUP}/s/ALL\$/NOPASSWD:ALL/g" /etc/sudoers +{% endraw %} ``` Modify `provisioner.inventory` in `molecule.yml` as follows: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/molecule-24.2.0/docs/installation.md new/molecule-24.2.1/docs/installation.md --- old/molecule-24.2.0/docs/installation.md 2024-02-08 18:10:44.000000000 +0100 +++ new/molecule-24.2.1/docs/installation.md 2024-04-09 16:09:11.000000000 +0200 @@ -1,7 +1,7 @@ # Installation -This document assumes the developer has a basic understanding of python -packaging, and how to install and manage python on the system executing +This document assumes the developer has a basic understanding of Python +packaging, and how to install and manage Python on the system executing Molecule. ## Requirements @@ -28,27 +28,17 @@ [pip] is the only supported installation method. -!!! warning - - Ansible is not listed as a direct dependency of molecule package because - we only call it as a command line tool. You may want to install it using - your distribution package installer. +{{ install_from_adt("ansible-navigator") }} ```bash $ python3 -m pip install molecule ansible-core ``` -!!! warning - - `ansible` and `ansible-base` pip **extras** were removed in molecule - `4.0.0`. If you used them, please switch to explicit package mention to - avoid problem with newer versions of molecule. - Keep in mind that on selinux supporting systems, if you install into a virtual environment, you may face [issue 34340](https://github.com/ansible/ansible/issues/34340) even if selinux is not enabled or is configured to be permissive. -It is your responsibility to assure that soft dependencies of Ansible +It is your responsibility to ensure that soft dependencies of Ansible are available on your controller or host machines. !!! warning @@ -67,8 +57,7 @@ ### Requirements Depending on the driver chosen, you may need to install additional -python packages. See the driver's documentation or `INSTALL.rst`, which -is created when initializing a new scenario. +Python packages. See the driver's documentation in that case. ### Install @@ -104,20 +93,20 @@ Installing molecule package also installed its main script `molecule`, usually in `PATH`. Users should know that molecule can also be called as -a python module, using `python -m molecule ...`. This alternative method +a python module, using `python3 -m molecule ...`. This alternative method has some benefits: -- allows to explicitly control which python interpreter is used by +- allows to explicitly control which Python interpreter is used by molecule -- allows molecule installation at user level without even needing to +- allows molecule installation at the user level without even needing to have the script in `PATH`. ## Container -Molecule is built into a container image by the [Ansible Creator Execution +`Molecule` is built into a container image by the [Ansible Creator Execution Environment](https://github.com/ansible/creator-ee) project, `creator-ee`. -Any questions or bugs related to use of Molecule from within a container +Any questions or bugs related to the use of Molecule from within a container should be addressed by the Ansible Creator Execution Environment project. @@ -129,9 +118,8 @@ updates. The package distribution that you'll get installed will be -autogenerated and will contain a commit hash information making it -easier to refer to certain unstable version should the need to send a -bug report arise. +autogenerated and will contain commit hash information, making it +easier to refer to. ### Requirements diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/molecule-24.2.0/mkdocs.yml new/molecule-24.2.1/mkdocs.yml --- old/molecule-24.2.0/mkdocs.yml 2024-02-08 18:10:44.000000000 +0100 +++ new/molecule-24.2.1/mkdocs.yml 2024-04-09 16:09:11.000000000 +0200 @@ -72,6 +72,7 @@ - guides/custom-image.md - guides/docker-rootless.md - guides/monolith.md + - guides/inside-a-container.md - guides/parallel.md - guides/podman-inside-docker.md - guides/sharing.md @@ -81,6 +82,8 @@ plugins: - autorefs + - macros: + modules: [mkdocs-ansible:mkdocs_ansible] - material/search: separator: '[\s\-,:!=\[\]()"`/]+|\.(?!\d)|&[lg]t;|(?!\b)(?=[A-Z][a-z])' - material/social diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/molecule-24.2.0/pyproject.toml new/molecule-24.2.1/pyproject.toml --- old/molecule-24.2.0/pyproject.toml 2024-02-08 18:10:44.000000000 +0100 +++ new/molecule-24.2.1/pyproject.toml 2024-04-09 16:09:11.000000000 +0200 @@ -76,7 +76,7 @@ known_first_party = "molecule" [tool.mypy] -python_version = 3.10 +python_version = "3.10" # strict = true color_output = true error_summary = true @@ -222,9 +222,7 @@ [tool.setuptools.dynamic] optional-dependencies.docs = { file = [".config/requirements-docs.txt"] } optional-dependencies.test = { file = [".config/requirements-test.txt"] } -optional-dependencies.testinfra = { file = [ - ".config/requirements-testinfra.txt", -] } +optional-dependencies.testinfra = { file = [".config/requirements-testinfra.txt"] } dependencies = { file = [".config/requirements.in"] } [tool.setuptools_scm] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/molecule-24.2.0/src/molecule/_version.py new/molecule-24.2.1/src/molecule/_version.py --- old/molecule-24.2.0/src/molecule/_version.py 2024-02-08 18:10:59.000000000 +0100 +++ new/molecule-24.2.1/src/molecule/_version.py 2024-04-09 16:09:23.000000000 +0200 @@ -12,5 +12,5 @@ __version_tuple__: VERSION_TUPLE version_tuple: VERSION_TUPLE -__version__ = version = '24.2.0' -__version_tuple__ = version_tuple = (24, 2, 0) +__version__ = version = '24.2.1' +__version_tuple__ = version_tuple = (24, 2, 1) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/molecule-24.2.0/src/molecule/console.py new/molecule-24.2.1/src/molecule/console.py --- old/molecule-24.2.0/src/molecule/console.py 2024-02-08 18:10:44.000000000 +0100 +++ new/molecule-24.2.1/src/molecule/console.py 2024-04-09 16:09:11.000000000 +0200 @@ -72,6 +72,12 @@ return sys.stdout.isatty() +# Define ANSIBLE_FORCE_COLOR if markup is enabled and another value is not +# already given. This assures that Ansible subprocesses are still colored, +# even if they do not run with a real TTY. +if should_do_markup(): + os.environ["ANSIBLE_FORCE_COLOR"] = os.environ.get("ANSIBLE_FORCE_COLOR", "1") + console_options: dict[str, Any] = {"emoji": False, "theme": theme, "soft_wrap": True} console = Console( @@ -83,9 +89,3 @@ console_options_stderr = console_options.copy() console_options_stderr["stderr"] = True console_stderr: Console = Console(**console_options_stderr) - -# Define ANSIBLE_FORCE_COLOR if markup is enabled and another value is not -# already given. This assures that Ansible subprocesses are still colored, -# even if they do not run with a real TTY. -if should_do_markup(): - os.environ["ANSIBLE_FORCE_COLOR"] = os.environ.get("ANSIBLE_FORCE_COLOR", "1") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/molecule-24.2.0/src/molecule/provisioner/ansible.py new/molecule-24.2.1/src/molecule/provisioner/ansible.py --- old/molecule-24.2.0/src/molecule/provisioner/ansible.py 2024-02-08 18:10:44.000000000 +0100 +++ new/molecule-24.2.1/src/molecule/provisioner/ansible.py 2024-04-09 16:09:11.000000000 +0200 @@ -515,32 +515,7 @@ self._config.ansible_collections_path: ":".join(collections_path_list), "ANSIBLE_LIBRARY": ":".join(self._get_modules_directories()), "ANSIBLE_FILTER_PLUGINS": ":".join( - [ - self._get_filter_plugin_directory(), - util.abs_path( - os.path.join( - self._config.scenario.ephemeral_directory, - "plugins", - "filter", - ), - ), - util.abs_path( - os.path.join( - self._config.project_directory, - "plugins", - "filter", - ), - ), - util.abs_path( - os.path.join( - os.path.expanduser("~"), - ".ansible", - "plugins", - "filter", - ), - ), - "/usr/share/ansible/plugins/filter", - ], + self._get_filter_plugins_directories(), ), }, ) @@ -904,6 +879,14 @@ if not os.path.exists(source): msg = f"The source path '{source}' does not exist." util.sysexit_with_message(msg) + if os.path.exists(target): + if os.path.realpath(target) == os.path.realpath(source): + msg = f"Required symlink {target} to {source} exist, skip creation" + LOG.debug(msg) + continue + msg = f"Required symlink {target} exist with another source" + LOG.debug(msg) + os.remove(target) msg = f"Inventory {source} linked to {target}" LOG.debug(msg) os.symlink(source, target) @@ -1004,5 +987,44 @@ def _get_filter_plugin_directory(self): return util.abs_path(os.path.join(self._get_plugin_directory(), "filter")) + def _get_filter_plugins_directories(self) -> list[str]: + """Return list of ansilbe filter plugins includes directories.""" + paths: list[str | None] = [] + if os.environ.get("ANSIBLE_FILTER_PLUGINS"): + paths = list( + map(util.abs_path, os.environ["ANSIBLE_FILTER_PLUGINS"].split(":")), + ) + + paths.extend( + [ + self._get_filter_plugin_directory(), + util.abs_path( + os.path.join( + self._config.scenario.ephemeral_directory, + "plugins", + "filter", + ), + ), + util.abs_path( + os.path.join( + self._config.project_directory, + "plugins", + "filter", + ), + ), + util.abs_path( + os.path.join( + os.path.expanduser("~"), + ".ansible", + "plugins", + "filter", + ), + ), + "/usr/share/ansible/plugins/filter", + ], + ) + + return [path for path in paths if path is not None] + def _absolute_path_for(self, env, key): return ":".join([self.abs_path(p) for p in env[key].split(":")]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/molecule-24.2.0/src/molecule.egg-info/PKG-INFO new/molecule-24.2.1/src/molecule.egg-info/PKG-INFO --- old/molecule-24.2.0/src/molecule.egg-info/PKG-INFO 2024-02-08 18:10:59.000000000 +0100 +++ new/molecule-24.2.1/src/molecule.egg-info/PKG-INFO 2024-04-09 16:09:23.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: molecule -Version: 24.2.0 +Version: 24.2.1 Summary: Molecule aids in the development and testing of Ansible roles Author-email: Ansible by Red Hat <[email protected]> Maintainer-email: Ansible by Red Hat <[email protected]> @@ -44,7 +44,7 @@ Requires-Dist: rich>=9.5.1 Requires-Dist: wcmatch>=8.1.2 Provides-Extra: docs -Requires-Dist: mkdocs-ansible>=24.2.1; extra == "docs" +Requires-Dist: mkdocs-ansible>=24.3.0; extra == "docs" Requires-Dist: pipdeptree>=2.4.0; extra == "docs" Requires-Dist: linkchecker>=10.4.0; extra == "docs" Provides-Extra: test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/molecule-24.2.0/src/molecule.egg-info/requires.txt new/molecule-24.2.1/src/molecule.egg-info/requires.txt --- old/molecule-24.2.0/src/molecule.egg-info/requires.txt 2024-02-08 18:10:59.000000000 +0100 +++ new/molecule-24.2.1/src/molecule.egg-info/requires.txt 2024-04-09 16:09:23.000000000 +0200 @@ -12,7 +12,7 @@ wcmatch>=8.1.2 [docs] -mkdocs-ansible>=24.2.1 +mkdocs-ansible>=24.3.0 pipdeptree>=2.4.0 linkchecker>=10.4.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/molecule-24.2.0/test/a_unit/provisioner/test_ansible.py new/molecule-24.2.1/test/a_unit/provisioner/test_ansible.py --- old/molecule-24.2.0/test/a_unit/provisioner/test_ansible.py 2024-02-08 18:10:44.000000000 +0100 +++ new/molecule-24.2.1/test/a_unit/provisioner/test_ansible.py 2024-04-09 16:09:11.000000000 +0200 @@ -749,6 +749,47 @@ assert x == parts[-5:] +def test_get_filter_plugins_directories_default(_instance, monkeypatch): + monkeypatch.delenv("ANSIBLE_FILTER_PLUGINS", raising=False) + + paths = _instance._get_filter_plugins_directories() + + assert len(paths) == 5 + assert re.search(r"molecule/provisioner/ansible/plugins/filter$", paths[0]) + assert re.search(r"\.cache/molecule/[^/]+/default/plugins/filter$", paths[1]) + assert re.search(r"/filter$", paths[2]) + assert re.search(r"\.ansible/plugins/filter$", paths[3]) + assert re.search(r"/usr/share/ansible/plugins/filter$", paths[4]) + + +def tes_get_filter_plugins_directories_single_ansible_filter_plugins( + _instance, + monkeypatch, +): + monkeypatch.setenv("ANSIBLE_FILTER_PLUGINS", "/abs/path/plugins/filter") + + paths = _instance._get_filter_plugins_directories() + + assert len(paths) == 6 + assert paths[0] == "/abs/path/plugins/filter" + + +def test_get_filter_plugins_directories_multi_ansible_filter_plugins( + _instance, + monkeypatch, +): + monkeypatch.setenv( + "ANSIBLE_FILTER_PLUGINS", + "relpath/plugins/filter:/abs/path/plugins/filter", + ) + + paths = _instance._get_filter_plugins_directories() + + assert len(paths) == 7 + assert paths[0].endswith("relpath/plugins/filter") + assert paths[1] == "/abs/path/plugins/filter" + + def test_absolute_path_for(_instance): env = {"foo": "foo:bar"} x = ":".join( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/molecule-24.2.0/test/scenarios/verifier/.pre-commit-config.yaml new/molecule-24.2.1/test/scenarios/verifier/.pre-commit-config.yaml --- old/molecule-24.2.0/test/scenarios/verifier/.pre-commit-config.yaml 2024-02-08 18:10:44.000000000 +0100 +++ new/molecule-24.2.1/test/scenarios/verifier/.pre-commit-config.yaml 2024-04-09 16:09:11.000000000 +0200 @@ -4,6 +4,6 @@ hooks: - id: flake8 name: flake8 - entry: python -m flake8 --max-line-length=120 + entry: python3 -m flake8 --max-line-length=120 language: system types: [python] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/molecule-24.2.0/tox.ini new/molecule-24.2.1/tox.ini --- old/molecule-24.2.0/tox.ini 2024-02-08 18:10:44.000000000 +0100 +++ new/molecule-24.2.1/tox.ini 2024-04-09 16:09:11.000000000 +0200 @@ -55,7 +55,7 @@ # failsafe as pip may install incompatible dependencies pip check # failsafe for preventing changes that may break pytest collection - sh -c "PYTEST_ADDOPTS= python -m pytest -p no:cov --collect-only >>/dev/null" + sh -c "PYTEST_ADDOPTS= python3 -m pytest -p no:cov --collect-only >>/dev/null" sh -c "rm -f .tox/.coverage.*" # html report is used by Zuul CI to display reports coverage run -m pytest {env:_EXTRAS} {env:PYTEST_ADDOPTS:} {posargs} @@ -71,7 +71,7 @@ basepython = python3.10 commands = # to run a single linter you can do "pre-commit run flake8" - python -m pre_commit run {posargs:--all --show-diff-on-failure} + python3 -m pre_commit run {posargs:--all --show-diff-on-failure} deps = pre-commit>=2.21.0 check-jsonschema>=0.20.0 @@ -86,8 +86,8 @@ passenv = * usedevelop = true commands = - linkchecker -f linkcheckerrc docs - mkdocs build -c --strict {posargs:} + linkchecker -q -f linkcheckerrc docs + mkdocs {posargs:build -c --strict} extras = docs @@ -105,11 +105,11 @@ setenv = commands = rm -rfv {toxinidir}/dist/ - python -m build \ + python3 -m build \ --outdir {toxinidir}/dist/ \ {toxinidir} # metadata validation - sh -c "python -m twine check --strict {toxinidir}/dist/*" + sh -c "python3 -m twine check --strict {toxinidir}/dist/*" [testenv:snap] description = Builds a snap package
