Expand copy tests.

pull/6073/head
root 11 years ago
parent dae2267c72
commit 5391b75088

@ -37,7 +37,6 @@
- "'state' in copy_result"
- "'uid' in copy_result"
- name: verify that the file was marked as changed
assert:
that:
@ -110,32 +109,21 @@
register: stat_bar
- name: check that a file in a deeper directory was transferred
stat: path={{output_dir}}/sub/subdir/subdir2/bar2.txt
stat: path={{output_dir}}/sub/subdir/subdir2/baz.txt
register: stat_bar2
- debug: var=stat_bar
- fail: msg="boom!"
when: not stat_bar.stat.exists
- assert: { that: "stat_bar.stat.exists" }
- name: assert recursive copy things
assert:
that:
- "stat_bar.stat.exists"
- "stat_bar2.stat.exists"
# TODO: test that copy fails if the path does not exist
- name: assert invalid copy location fails
copy: src=invalid_file_location_does_not_exist dest={{output_dir}}/file.txt
ignore_errors: True
register: failed_copy
- debug: var=failed_copy
# errors on this aren't presently ignored so this test is commented out. But it would be nice to fix.
#
#- name: assert invalid copy input location fails
# copy: src=invalid_file_location_does_not_exist dest={{output_dir}}/file.txt
# ignore_errors: True
# register: failed_copy
# TODO: ...

Loading…
Cancel
Save