community.general/tests/integration/targets/pipx/tasks/testcase-9103-upgrade-global.yml
patchback[bot] 0dfa80d386
[PR #10822/0911db45 backport][stable-11] pipx: review tests (#10824)
pipx: review tests (#10822)

(cherry picked from commit 0911db457e)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
2025-09-13 10:30:52 +02:00

38 lines
999 B
YAML

---
# Copyright (c) Ansible Project
# 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: 9103-Ensure application hello-world is uninstalled
community.general.pipx:
name: hello-world
state: absent
global: true
- name: 9103-Install application hello-world
community.general.pipx:
name: hello-world
source: hello-world==0.1
global: true
register: install_hw
- name: 9103-Upgrade application hello-world
community.general.pipx:
state: upgrade
name: hello-world
global: true
register: upgrade_hw
- name: 9103-Ensure application hello-world is uninstalled
community.general.pipx:
name: hello-world
state: absent
global: true
- name: 9103-Assertions
ansible.builtin.assert:
that:
- install_hw is changed
- upgrade_hw is changed
- upgrade_hw.cmd[-3] == "upgrade"
- upgrade_hw.cmd[-2] == "--global"