Test version of pip being installed
This commit adds a test to validate that we get the correct version of a package when we override pip_packages. This test may break if this selected version of pip is removed however pypi still seems to have 0.2 which goes back to 2008. Change-Id: I26afe6303bec560c10483d18472d4e8314a6f297
This commit is contained in:
parent
f5d179a64d
commit
17b5b32bb3
|
@ -16,6 +16,9 @@
|
|||
- name: Playbook for role testing
|
||||
hosts: localhost
|
||||
connection: local
|
||||
vars:
|
||||
pip_packages:
|
||||
- "pip==8.0.3"
|
||||
roles:
|
||||
- role: "{{ rolename | basename }}"
|
||||
post_tasks:
|
||||
|
@ -33,9 +36,14 @@
|
|||
register: pip_selfcheck_file
|
||||
- name: Get pip path
|
||||
command: which pip
|
||||
register: pip_path
|
||||
- name: Get pip version
|
||||
command: "{{ pip_path.stdout }} -V"
|
||||
register: pip_version
|
||||
- name: Check role functions
|
||||
assert:
|
||||
that:
|
||||
- "get_pip_file.stat.exists"
|
||||
- "pip_dir.stat.isdir"
|
||||
- "pip_selfcheck_file.stat.exists"
|
||||
- "'pip 8.0.3 ' in pip_version.stdout"
|
||||
|
|
Loading…
Reference in New Issue