diff options
author | Robin Roth <robin@rroth.de> | 2017-01-11 19:47:16 +0100 |
---|---|---|
committer | John R Barker <john@johnrbarker.com> | 2017-01-11 19:47:16 +0100 |
commit | 4976429e423b5de283885637491b168c097a8ee9 (patch) | |
tree | b17f60f0815d4d9731c2b73ef6fa4214b4cd06bd /test/integration/targets/zypper | |
parent | Add ZYPP_LOCK_TIMEOUT environment example (#20130) (diff) | |
download | ansible-4976429e423b5de283885637491b168c097a8ee9.tar.xz ansible-4976429e423b5de283885637491b168c097a8ee9.zip |
Zypper: Fix update_cache in checkmode (#20143)
Fixes #20139
Refresh does not support dry-run, so don't run it in check mode.
Also add a test for this case.
Diffstat (limited to 'test/integration/targets/zypper')
-rw-r--r-- | test/integration/targets/zypper/tasks/zypper.yml | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/integration/targets/zypper/tasks/zypper.yml b/test/integration/targets/zypper/tasks/zypper.yml index 4fe05f0125..c79c5e6cf6 100644 --- a/test/integration/targets/zypper/tasks/zypper.yml +++ b/test/integration/targets/zypper/tasks/zypper.yml @@ -334,3 +334,27 @@ - zypperin1|changed - not zypperin2|changed when: ansible_distribution == 'openSUSE Leap' and ansible_distribution_version == '42.1' + + +# check for https://github.com/ansible/ansible/issues/20139 +- name: run updatecache + zypper: + name: hello + state: present + update_cache: True + register: zypper_result_update_cache + +- name: run updatecache in check mode + zypper: + name: hello + state: present + update_cache: True + check_mode: True + register: zypper_result_update_cache_check + + +- assert: + that: + - zypper_result_update_cache|success + - zypper_result_update_cache_check|success + - not zypper_result_update_cache_check|changed |