From 2eedbdc92852807ce4875bceb74380972a49cbb7 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Sat, 13 Sep 2025 10:30:45 +0200 Subject: [PATCH] [PR #10822/0911db45 backport][stable-10] pipx: review tests (#10825) pipx: review tests (#10822) (cherry picked from commit 0911db457eeab53ac2c4873ef76fbd446468d7aa) Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> --- tests/integration/targets/pipx/tasks/main.yml | 14 -------------- .../targets/pipx/tasks/testcase-7497.yml | 16 ++++++++-------- .../targets/pipx/tasks/testcase-8809-pin.yml | 6 +----- .../pipx/tasks/testcase-8809-uninjectpkg.yml | 8 ++------ .../pipx/tasks/testcase-9009-fixglobal.yml | 16 ++++++++-------- .../pipx/tasks/testcase-9103-upgrade-global.yml | 4 ++-- .../pipx/tasks/testcase-9619-latest-global.yml | 4 ++-- 7 files changed, 23 insertions(+), 45 deletions(-) diff --git a/tests/integration/targets/pipx/tasks/main.yml b/tests/integration/targets/pipx/tasks/main.yml index 6d0d98bcef..a8ed133baa 100644 --- a/tests/integration/targets/pipx/tasks/main.yml +++ b/tests/integration/targets/pipx/tasks/main.yml @@ -120,24 +120,12 @@ state: reinstall register: reinstall_tox_324 -- name: reinstall without name - community.general.pipx: - state: reinstall - register: reinstall_noname - ignore_errors: true - - name: upgrade tox from 3.24.0 community.general.pipx: name: tox state: upgrade register: upgrade_tox_324 -- name: upgrade without name - community.general.pipx: - state: upgrade - register: upgrade_noname - ignore_errors: true - - name: downgrade tox 3.24.0 community.general.pipx: name: tox @@ -165,8 +153,6 @@ - downgrade_tox_324.application.tox.version == '3.24.0' - uninstall_tox_324 is changed - "'tox' not in uninstall_tox_324.application" - - upgrade_noname is failed - - reinstall_noname is failed ############################################################################## - name: install application latest tox diff --git a/tests/integration/targets/pipx/tasks/testcase-7497.yml b/tests/integration/targets/pipx/tasks/testcase-7497.yml index 938196ef59..af7e63203c 100644 --- a/tests/integration/targets/pipx/tasks/testcase-7497.yml +++ b/tests/integration/targets/pipx/tasks/testcase-7497.yml @@ -3,25 +3,25 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -- name: ensure application pyinstaller is uninstalled +- name: ensure application conan is uninstalled community.general.pipx: - name: pyinstaller + name: conan state: absent -- name: Install Python Package pyinstaller +- name: Install conan community.general.pipx: - name: pyinstaller + name: conan state: present system_site_packages: true pip_args: "--no-cache-dir" - register: install_pyinstaller + register: install_conan -- name: cleanup pyinstaller +- name: cleanup conan community.general.pipx: - name: pyinstaller + name: conan state: absent - name: check assertions assert: that: - - install_pyinstaller is changed + - install_conan is changed diff --git a/tests/integration/targets/pipx/tasks/testcase-8809-pin.yml b/tests/integration/targets/pipx/tasks/testcase-8809-pin.yml index c25073a719..abc71a5719 100644 --- a/tests/integration/targets/pipx/tasks/testcase-8809-pin.yml +++ b/tests/integration/targets/pipx/tasks/testcase-8809-pin.yml @@ -54,11 +54,7 @@ - name: Uninstall pycowsay and black (again) community.general.pipx: state: uninstall - name: "{{ item }}" - loop: - - black - - pycowsay - register: uninstall_all_2 + name: pycowsay - name: Assert pin/unpin ansible.builtin.assert: diff --git a/tests/integration/targets/pipx/tasks/testcase-8809-uninjectpkg.yml b/tests/integration/targets/pipx/tasks/testcase-8809-uninjectpkg.yml index 4092d6f244..b319b54d93 100644 --- a/tests/integration/targets/pipx/tasks/testcase-8809-uninjectpkg.yml +++ b/tests/integration/targets/pipx/tasks/testcase-8809-uninjectpkg.yml @@ -7,7 +7,7 @@ environment: PATH: /usr/local/bin:{{ ansible_env.PATH }} block: - - name: Uninstall pycowsay and black + - name: Uninstall pycowsay community.general.pipx: state: uninstall name: pycowsay @@ -54,11 +54,7 @@ - name: Uninstall pycowsay and black (again) community.general.pipx: state: uninstall - name: "{{ item }}" - loop: - - black - - pycowsay - register: uninstall_all_2 + name: pycowsay - name: Assert uninstall-all ansible.builtin.assert: diff --git a/tests/integration/targets/pipx/tasks/testcase-9009-fixglobal.yml b/tests/integration/targets/pipx/tasks/testcase-9009-fixglobal.yml index ffcd2651d0..df5a05ba10 100644 --- a/tests/integration/targets/pipx/tasks/testcase-9009-fixglobal.yml +++ b/tests/integration/targets/pipx/tasks/testcase-9009-fixglobal.yml @@ -3,28 +3,28 @@ # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # SPDX-License-Identifier: GPL-3.0-or-later -- name: 9009-Ensure application pylint is uninstalled +- name: 9009-Ensure application pycowsay is uninstalled community.general.pipx: - name: pylint + name: pycowsay state: absent global: true -- name: 9009-Install application pylint +- name: 9009-Install application pycowsay community.general.pipx: - name: pylint + name: pycowsay global: true - register: install_pylint + register: install_pycowsay - name: 9009-Inject packages community.general.pipx: state: inject - name: pylint + name: pycowsay global: true inject_packages: - licenses -- name: 9009-Ensure application pylint is uninstalled +- name: 9009-Ensure application pycowsay is uninstalled community.general.pipx: - name: pylint + name: pycowsay state: absent global: true diff --git a/tests/integration/targets/pipx/tasks/testcase-9103-upgrade-global.yml b/tests/integration/targets/pipx/tasks/testcase-9103-upgrade-global.yml index 60621a42be..eb4419a7f4 100644 --- a/tests/integration/targets/pipx/tasks/testcase-9103-upgrade-global.yml +++ b/tests/integration/targets/pipx/tasks/testcase-9103-upgrade-global.yml @@ -23,9 +23,9 @@ global: true register: upgrade_hw -- name: 9103-Ensure application pylint is uninstalled +- name: 9103-Ensure application hello-world is uninstalled community.general.pipx: - name: pylint + name: hello-world state: absent global: true diff --git a/tests/integration/targets/pipx/tasks/testcase-9619-latest-global.yml b/tests/integration/targets/pipx/tasks/testcase-9619-latest-global.yml index e06ee438c0..644e3b8dd7 100644 --- a/tests/integration/targets/pipx/tasks/testcase-9619-latest-global.yml +++ b/tests/integration/targets/pipx/tasks/testcase-9619-latest-global.yml @@ -23,9 +23,9 @@ global: true register: latest_hw -- name: 9619-Ensure application pylint is uninstalled +- name: 9619-Ensure application hello-world is uninstalled community.general.pipx: - name: pylint + name: hello-world state: absent global: true