summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2021-11-09 13:57:30 -0800
committerMatt Clay <matt@mystile.com>2021-11-09 15:31:37 -0800
commitcceb0abd15c8370ce3391a912fda1d63d593e285 (patch)
tree1424d1fdc8d3b1f65d1894682e40cbebdf39efcb
parent59c16e207345aedee6c0440590b3a1d4c4e37d7b (diff)
downloadansible-cceb0abd15c8370ce3391a912fda1d63d593e285.tar.gz
[stable-2.9] Fix pip integration test.
- Use `fallible==0.0.1a2` instead of `black==19.10b` - Test on both Python 2 and 3. (cherry picked from commit b6725ec6c994d725cc2190b784a422299fd98385) Co-authored-by: Matt Clay <matt@mystile.com>
-rw-r--r--test/integration/targets/pip/tasks/pip.yml21
1 files changed, 8 insertions, 13 deletions
diff --git a/test/integration/targets/pip/tasks/pip.yml b/test/integration/targets/pip/tasks/pip.yml
index 0530dcc158..4bcfd4d361 100644
--- a/test/integration/targets/pip/tasks/pip.yml
+++ b/test/integration/targets/pip/tasks/pip.yml
@@ -555,27 +555,24 @@
# https://github.com/ansible/ansible/issues/68592
# Handle pre-release version numbers in check_mode for already-installed
# packages.
-# TODO: Limiting to py3 test boxes for now so the example of 'black' installs,
-# we should probably find another package to use with a similar versioning
-# scheme or make a small one and enable this test for py2 as well.
- block:
- - name: Install a beta version of a package
+ - name: Install a pre-release version of a package
pip:
- name: black
- version: 19.10b0
+ name: fallible
+ version: 0.0.1a2
state: present
- name: Use check_mode and ensure that the package is shown as installed
check_mode: true
pip:
- name: black
+ name: fallible
state: present
register: pip_prereleases
- - name: Uninstall the beta package if we need to
+ - name: Uninstall the pre-release package if we need to
pip:
- name: black
- version: 19.10b0
+ name: fallible
+ version: 0.0.1a2
state: absent
when: pip_prereleases is changed
@@ -583,6 +580,4 @@
that:
- pip_prereleases is successful
- pip_prereleases is not changed
- - '"black==19.10b0" in pip_prereleases.stdout_lines'
-
- when: ansible_python.version.major == 3
+ - '"fallible==0.0.1a2" in pip_prereleases.stdout_lines'