Adding integration tests for async fire-and-forget checking

Also updated the CHANGELOG for the feature
This commit is contained in:
James Cammarata 2014-09-25 15:42:45 -05:00
commit 21dcfd7192
2 changed files with 26 additions and 0 deletions

View file

@ -62,3 +62,28 @@
async: 15
poll: 0
when: False
# test async "fire and forget, but check later"
- name: 'start a task with "fire-and-forget"'
command: sleep 15
async: 30
poll: 0
register: fnf_task
- name: assert task was successfully started
assert:
that:
- fnf_task.started
- "'ansible_job_id' in fnf_task"
- name: 'check on task started as a "fire-and-forget"'
async_status: jid={{ fnf_task.ansible_job_id }}
register: fnf_result
until: fnf_result.finished
retries: 30
- name: assert task was successfully checked
assert:
that:
- fnf_result.finished