From 2716fe4362f85b97e7f42077cf89d99fcb03f357 Mon Sep 17 00:00:00 2001 From: Rob Cutmore Date: Tue, 20 Sep 2016 10:07:27 -0400 Subject: [PATCH] Add test for checking pip package in check mode (#17360) --- test/integration/roles/test_pip/tasks/main.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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"