summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Cutmore <rcutmore@users.noreply.github.com>2016-09-20 10:07:27 -0400
committerToshio Kuratomi <a.badger@gmail.com>2016-09-20 07:07:27 -0700
commit2716fe4362f85b97e7f42077cf89d99fcb03f357 (patch)
treeca52fb7ad644544f243903147a2ae97aca69402d
parent547cea556fa29f9bfaf11a68028e7d5eb5a07583 (diff)
downloadansible-2716fe4362f85b97e7f42077cf89d99fcb03f357.tar.gz
Add test for checking pip package in check mode (#17360)
-rw-r--r--test/integration/roles/test_pip/tasks/main.yml16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/integration/roles/test_pip/tasks/main.yml b/test/integration/roles/test_pip/tasks/main.yml
index b95c52c435..592be06a7a 100644
--- a/test/integration/roles/test_pip/tasks/main.yml
+++ b/test/integration/roles/test_pip/tasks/main.yml
@@ -116,3 +116,19 @@
assert:
that:
- "not url_installed.changed"
+
+
+# Test pip package in check mode doesn't always report changed.
+
+- name: check for pip package
+ pip: name=pip virtualenv={{ output_dir }}/pipenv state=present
+
+- name: check for pip package in check_mode
+ pip: name=pip virtualenv={{ output_dir }}/pipenv state=present
+ check_mode: True
+ register: pip_check_mode
+
+- name: make sure pip in check_mode doesn't report changed
+ assert:
+ that:
+ - "not pip_check_mode.changed"