-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PR #9623/03dfed4c backport][stable-10] pipx: use global in state=lat…
…est (#9638) pipx: use global in state=latest (#9623) * pipx: use global in state=latest * add changelog frag (cherry picked from commit 03dfed4) Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
- Loading branch information
1 parent
666db05
commit b4e7b7c
Showing
4 changed files
with
45 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
bugfixes: | ||
- pipx - honor option ``global`` when ``state=latest`` (https://github.com/ansible-collections/community.general/pull/9623). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
tests/integration/targets/pipx/tasks/testcase-9619-latest-global.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
# 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: 9619-Ensure application hello-world is uninstalled | ||
community.general.pipx: | ||
name: hello-world | ||
state: absent | ||
global: true | ||
|
||
- name: 9619-Install application hello-world | ||
community.general.pipx: | ||
name: hello-world | ||
source: hello-world==0.1 | ||
global: true | ||
register: install_hw | ||
|
||
- name: 9619-Upgrade application hello-world | ||
community.general.pipx: | ||
state: latest | ||
name: hello-world | ||
global: true | ||
register: latest_hw | ||
|
||
- name: 9619-Ensure application pylint is uninstalled | ||
community.general.pipx: | ||
name: pylint | ||
state: absent | ||
global: true | ||
|
||
- name: 9619-Assertions | ||
ansible.builtin.assert: | ||
that: | ||
- install_hw is changed | ||
- latest_hw is changed | ||
- latest_hw.cmd[-3] == "upgrade" | ||
- latest_hw.cmd[-2] == "--global" |