tests: teach various tests to cleanup /tmp when they're done.

issue260
David Wilson 6 years ago
parent 40d2cf7e25
commit fd5066d671

@ -64,3 +64,20 @@
- stat.results[2].stat.checksum == "b26dd6444595e2bdb342aa0a91721b57478b5029"
- stat.results[3].stat.checksum == "d675f47e467eae19e49032a2cc39118e12a6ee72"
- file:
state: absent
path: "{{item}}"
with_items:
- /tmp/copy-tiny-file
- /tmp/copy-tiny-file.out
- /tmp/copy-no-mode
- /tmp/copy-no-mode.out
- /tmp/copy-with-mode
- /tmp/copy-with-mode.out
- /tmp/copy-large-file
- /tmp/copy-large-file.out
- /tmp/copy-tiny-inline-file.out
- /tmp/copy-large-inline-file
- /tmp/copy-large-inline-file.out
# end of cleaning out files (again)

@ -102,3 +102,16 @@
- assert:
that:
- out.stat.mode == "1461"
- file:
state: absent
path: "{{item}}"
with_items:
- /tmp/weird-mode
- /tmp/weird-mode.out
- /tmp/copy-no-mode
- /tmp/copy-no-mode.out
- /tmp/copy-with-mode
- /tmp/copy-with-mode.out
# end of cleaning out files

@ -32,6 +32,7 @@
- file:
path: /tmp/sync-test.out
state: absent
become: true
- synchronize:
private_key: /tmp/synchronize-action-key
@ -46,3 +47,12 @@
- assert:
that: outout == "item!"
- file:
path: "{{item}}"
state: absent
become: true
with_items:
- /tmp/synchronize-action-key
- /tmp/sync-test
- /tmp/sync-test.out

Loading…
Cancel
Save