mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
fetch: fail if flat=yes and dest=existing-dir w/o trailing slash
This commit is contained in:
parent
f3bc8b84b6
commit
36c6d0f748
2 changed files with 19 additions and 0 deletions
|
@ -122,3 +122,17 @@
|
|||
assert:
|
||||
that:
|
||||
'diff.stdout == ""'
|
||||
|
||||
- name: dest is an existing directory name without trailing slash and flat=yes, should fail
|
||||
fetch:
|
||||
src: "{{ output_dir }}/orig"
|
||||
dest: "{{ output_dir }}"
|
||||
flat: yes
|
||||
register: failed_fetch_dest_dir
|
||||
ignore_errors: true
|
||||
|
||||
- name: check that it indeed failed
|
||||
assert:
|
||||
that:
|
||||
- "failed_fetch_dest_dir|failed"
|
||||
- "failed_fetch_dest_dir.msg"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue