1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

[PR #8665/58f9860b backport][stable-8] Fix pipx tests (#8669)

Fix pipx tests (#8665)

* fix pipx tests

* enable pipx int tests

* replace ansible-lint with pylint in pipx test

* install jupyter in freebsd

* replace jupyter with mkdocs in pipx test

* adjust installed dependency for mkdocs

* fix pipx_info tests as well

(cherry picked from commit 58f9860ba7)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2024-07-23 22:03:23 +02:00 committed by GitHub
parent 5251c8b075
commit 104d98ef02
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 37 additions and 39 deletions

View file

@ -6,4 +6,3 @@ azp/posix/2
destructive
skip/python2
skip/python3.5
disabled # TODO

View file

@ -217,76 +217,76 @@
- "'tox' not in uninstall_tox_again.application"
##############################################################################
- name: ensure application ansible-lint is uninstalled
- name: ensure application pylint is uninstalled
community.general.pipx:
name: ansible-lint
name: pylint
state: absent
- name: install application ansible-lint
- name: install application pylint
community.general.pipx:
name: ansible-lint
register: install_ansible_lint
name: pylint
register: install_pylint
- name: inject packages
community.general.pipx:
state: inject
name: ansible-lint
name: pylint
inject_packages:
- licenses
register: inject_pkgs_ansible_lint
register: inject_pkgs_pylint
- name: inject packages with apps
community.general.pipx:
state: inject
name: ansible-lint
name: pylint
inject_packages:
- black
install_apps: true
register: inject_pkgs_apps_ansible_lint
register: inject_pkgs_apps_pylint
- name: cleanup ansible-lint
- name: cleanup pylint
community.general.pipx:
state: absent
name: ansible-lint
register: uninstall_ansible_lint
name: pylint
register: uninstall_pylint
- name: check assertions inject_packages
assert:
that:
- install_ansible_lint is changed
- inject_pkgs_ansible_lint is changed
- '"ansible-lint" in inject_pkgs_ansible_lint.application'
- '"licenses" in inject_pkgs_ansible_lint.application["ansible-lint"]["injected"]'
- inject_pkgs_apps_ansible_lint is changed
- '"ansible-lint" in inject_pkgs_apps_ansible_lint.application'
- '"black" in inject_pkgs_apps_ansible_lint.application["ansible-lint"]["injected"]'
- uninstall_ansible_lint is changed
- install_pylint is changed
- inject_pkgs_pylint is changed
- '"pylint" in inject_pkgs_pylint.application'
- '"licenses" in inject_pkgs_pylint.application["pylint"]["injected"]'
- inject_pkgs_apps_pylint is changed
- '"pylint" in inject_pkgs_apps_pylint.application'
- '"black" in inject_pkgs_apps_pylint.application["pylint"]["injected"]'
- uninstall_pylint is changed
##############################################################################
- name: install jupyter - not working smoothly in freebsd
when: ansible_system != 'FreeBSD'
# when: ansible_system != 'FreeBSD'
block:
- name: ensure application jupyter is uninstalled
- name: ensure application mkdocs is uninstalled
community.general.pipx:
name: jupyter
name: mkdocs
state: absent
- name: install application jupyter
- name: install application mkdocs
community.general.pipx:
name: jupyter
name: mkdocs
install_deps: true
register: install_jupyter
register: install_mkdocs
- name: cleanup jupyter
- name: cleanup mkdocs
community.general.pipx:
state: absent
name: jupyter
name: mkdocs
- name: check assertions
assert:
that:
- install_jupyter is changed
- '"ipython" in install_jupyter.stdout'
- install_mkdocs is changed
- '"markdown_py" in install_mkdocs.stdout'
##############################################################################
- name: ensure /opt/pipx

View file

@ -6,4 +6,3 @@ azp/posix/3
destructive
skip/python2
skip/python3.5
disabled # TODO

View file

@ -68,7 +68,7 @@
apps:
- name: tox
source: tox==3.24.0
- name: ansible-lint
- name: pylint
inject_packages:
- licenses
@ -102,9 +102,9 @@
include_injected: true
register: info2_all_deps
- name: retrieve application ansible-lint
- name: retrieve application pylint
community.general.pipx_info:
name: ansible-lint
name: pylint
include_deps: true
include_injected: true
register: info2_lint