summaryrefslogtreecommitdiffstats
path: root/test/integration
diff options
context:
space:
mode:
authorDavid Shrewsbury <Shrews@users.noreply.github.com>2021-03-04 20:06:27 +0100
committerGitHub <noreply@github.com>2021-03-04 20:06:27 +0100
commit78d3810fdf7c579be5d9be8412844ae79d3f313b (patch)
tree65ed187a3c1914192d78726a3bb11a5ddcf97021 /test/integration
parentfeature_request: Component Name (#73787) (diff)
downloadansible-78d3810fdf7c579be5d9be8412844ae79d3f313b.tar.xz
ansible-78d3810fdf7c579be5d9be8412844ae79d3f313b.zip
Auto cleanup of async cache file (#73760)
* Auto cleanup of async cache file * Add changelog
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/targets/async/tasks/main.yml19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/integration/targets/async/tasks/main.yml b/test/integration/targets/async/tasks/main.yml
index b5bebf1092..c8c12f6d60 100644
--- a/test/integration/targets/async/tasks/main.yml
+++ b/test/integration/targets/async/tasks/main.yml
@@ -42,6 +42,25 @@
- async_result.finished == 1
- async_result is finished
+- name: assert temp async directory exists
+ stat:
+ path: "~/.ansible_async"
+ register: dir_st
+
+- assert:
+ that:
+ - dir_st.stat.isdir is defined and dir_st.stat.isdir
+
+- name: stat temp async status file
+ stat:
+ path: "~/.ansible_async/{{ async_result.ansible_job_id }}"
+ register: tmp_async_file_st
+
+- name: validate automatic cleanup of temp async status file on completed run
+ assert:
+ that:
+ - not tmp_async_file_st.stat.exists
+
- name: test async without polling
command: sleep 5
async: 30