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

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
This commit is contained in:
Alexei Znamensky 2024-07-24 04:00:44 +12:00 committed by GitHub
parent e3fb817a21
commit 58f9860ba7
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 destructive
skip/python2 skip/python2
skip/python3.5 skip/python3.5
disabled # TODO

View file

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

View file

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

View file

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