Copy tests: check the result of non-changing copy
This commit is contained in:
parent
7d1eb88ecf
commit
d73c3abb15
1 changed files with 15 additions and 1 deletions
|
@ -37,6 +37,7 @@
|
||||||
|
|
||||||
- set_fact:
|
- set_fact:
|
||||||
remote_dir_expanded: '{{ echo.stdout }}'
|
remote_dir_expanded: '{{ echo.stdout }}'
|
||||||
|
remote_file_expanded: '{{ echo.stdout }}/foo.txt'
|
||||||
|
|
||||||
- debug:
|
- debug:
|
||||||
var: copy_result
|
var: copy_result
|
||||||
|
@ -46,7 +47,7 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- "'changed' in copy_result"
|
- "'changed' in copy_result"
|
||||||
- "'dest' in copy_result"
|
- copy_result.dest == remote_file_expanded
|
||||||
- "'group' in copy_result"
|
- "'group' in copy_result"
|
||||||
- "'gid' in copy_result"
|
- "'gid' in copy_result"
|
||||||
- "'md5sum' in copy_result"
|
- "'md5sum' in copy_result"
|
||||||
|
@ -111,6 +112,19 @@
|
||||||
that:
|
that:
|
||||||
- "copy_result2 is not changed"
|
- "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
|
- name: Overwrite the file using the content system
|
||||||
copy:
|
copy:
|
||||||
content: "modified"
|
content: "modified"
|
||||||
|
|
Loading…
Reference in a new issue