summaryrefslogtreecommitdiffstats
path: root/test/integration
diff options
context:
space:
mode:
authorMartin Krizek <martin.krizek@gmail.com>2019-03-04 19:08:58 +0100
committeransibot <ansibot@users.noreply.github.com>2019-03-04 19:08:58 +0100
commit239fb1f68d8b2c81776906bd77f7e39f0985b2a4 (patch)
treec206bee078fe0727fe0ff20ab4cee6e45e017b66 /test/integration
parentk8s_auth: use group module defaults in example (#52712) (diff)
downloadansible-239fb1f68d8b2c81776906bd77f7e39f0985b2a4.tar.xz
ansible-239fb1f68d8b2c81776906bd77f7e39f0985b2a4.zip
yum/dnf: Add download_dir param (#53171)
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/targets/dnf/tasks/dnf.yml30
-rw-r--r--test/integration/targets/yum/tasks/yum.yml30
2 files changed, 56 insertions, 4 deletions
diff --git a/test/integration/targets/dnf/tasks/dnf.yml b/test/integration/targets/dnf/tasks/dnf.yml
index 75d1429db2..7adc2870b8 100644
--- a/test/integration/targets/dnf/tasks/dnf.yml
+++ b/test/integration/targets/dnf/tasks/dnf.yml
@@ -233,13 +233,12 @@
dnf: name=sos installroot='/'
register: dnf_result
-# Test download_only
- name: uninstall sos for downloadonly test
dnf:
name: sos
state: absent
-- name: install sos
+- name: Test download_only
dnf:
name: sos
state: latest
@@ -264,6 +263,33 @@
- "dnf_result is success"
- "not dnf_result is changed"
+- name: uninstall sos for downloadonly/downloaddir test
+ dnf:
+ name: sos
+ state: absent
+
+- name: Test download_only/download_dir
+ dnf:
+ name: sos
+ state: latest
+ download_only: true
+ download_dir: "/var/tmp/packages"
+ register: dnf_result
+
+- name: verify dnf output
+ assert:
+ that:
+ - "dnf_result is success"
+ - "dnf_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"
+
# GROUP INSTALL
- name: install Custom Group group
dnf:
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"