summaryrefslogtreecommitdiff
path: root/test/integration/targets/copy
diff options
context:
space:
mode:
authorTomasz Kontusz <tomasz.kontusz@gmail.com>2018-02-04 12:30:52 +0100
committerToshio Kuratomi <a.badger@gmail.com>2018-02-08 16:17:36 -0800
commitd73c3abb152d1f8bb48cb5963b62521e34e8f3ee (patch)
tree952adfc0b4c98120e5284fc02630efe37dce8e1e /test/integration/targets/copy
parent7d1eb88ecf05909a79eee2b019f4f5e55f2da029 (diff)
downloadansible-d73c3abb152d1f8bb48cb5963b62521e34e8f3ee.tar.gz
Copy tests: check the result of non-changing copy
Diffstat (limited to 'test/integration/targets/copy')
-rw-r--r--test/integration/targets/copy/tasks/tests.yml16
1 files changed, 15 insertions, 1 deletions
diff --git a/test/integration/targets/copy/tasks/tests.yml b/test/integration/targets/copy/tasks/tests.yml
index 8fc0b3a8a7..51c6cb3919 100644
--- a/test/integration/targets/copy/tasks/tests.yml
+++ b/test/integration/targets/copy/tasks/tests.yml
@@ -37,6 +37,7 @@
- set_fact:
remote_dir_expanded: '{{ echo.stdout }}'
+ remote_file_expanded: '{{ echo.stdout }}/foo.txt'
- debug:
var: copy_result
@@ -46,7 +47,7 @@
assert:
that:
- "'changed' in copy_result"
- - "'dest' in copy_result"
+ - copy_result.dest == remote_file_expanded
- "'group' in copy_result"
- "'gid' in copy_result"
- "'md5sum' in copy_result"
@@ -111,6 +112,19 @@
that:
- "copy_result2 is not changed"
+- name: Assert basic copy worked
+ assert:
+ that:
+ - "'changed' in copy_result2"
+ - copy_result2.dest == remote_file_expanded
+ - "'group' in copy_result2"
+ - "'gid' in copy_result2"
+ - "'checksum' in copy_result2"
+ - "'owner' in copy_result2"
+ - "'size' in copy_result2"
+ - "'state' in copy_result2"
+ - "'uid' in copy_result2"
+
- name: Overwrite the file using the content system
copy:
content: "modified"