From 239fb1f68d8b2c81776906bd77f7e39f0985b2a4 Mon Sep 17 00:00:00 2001 From: Martin Krizek Date: Mon, 4 Mar 2019 19:08:58 +0100 Subject: yum/dnf: Add download_dir param (#53171) --- test/integration/targets/yum/tasks/yum.yml | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) (limited to 'test/integration/targets/yum') diff --git a/test/integration/targets/yum/tasks/yum.yml b/test/integration/targets/yum/tasks/yum.yml index 7957e8bb16..29da992560 100644 --- a/test/integration/targets/yum/tasks/yum.yml +++ b/test/integration/targets/yum/tasks/yum.yml @@ -303,8 +303,7 @@ state: removed register: yum_result -# Test download_only -- name: install sos +- name: Test download_only yum: name: sos state: latest @@ -329,6 +328,33 @@ - "yum_result is success" - "not yum_result is changed" +- name: uninstall sos for downloadonly/downloaddir test + yum: + name: sos + state: absent + +- name: Test download_only/download_dir + yum: + name: sos + state: latest + download_only: true + download_dir: "/var/tmp/packages" + register: yum_result + +- name: verify yum output + assert: + that: + - "yum_result is success" + - "yum_result is changed" + +- command: "ls /var/tmp/packages" + register: ls_out + +- name: Verify specified download_dir was used + assert: + that: + - "'sos' in ls_out.stdout" + - name: install group yum: name: "@Development Tools" -- cgit v1.2.3