diff options
author | David Shrewsbury <Shrews@users.noreply.github.com> | 2021-06-22 12:19:32 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-22 12:19:32 -0400 |
commit | 703cb79442eddd4f984593eb904a19e0880ad00e (patch) | |
tree | e96fdd80304311892ef1e4ff41c09d4a5738b193 /test/integration | |
parent | ca6123e0ee0707b4cdf74137b5778fd913da8357 (diff) | |
download | ansible-703cb79442eddd4f984593eb904a19e0880ad00e.tar.gz |
Implement async callbacks (#74953)
* add changelog and output from default callback
* add test
* add comments about TE task
Diffstat (limited to 'test/integration')
-rwxr-xr-x | test/integration/targets/callback_default/runme.sh | 7 | ||||
-rw-r--r-- | test/integration/targets/callback_default/test_async.yml | 14 |
2 files changed, 21 insertions, 0 deletions
diff --git a/test/integration/targets/callback_default/runme.sh b/test/integration/targets/callback_default/runme.sh index b5c98ef72b..f9b60b6ba3 100755 --- a/test/integration/targets/callback_default/runme.sh +++ b/test/integration/targets/callback_default/runme.sh @@ -125,6 +125,13 @@ export ANSIBLE_CHECK_MODE_MARKERS=0 run_test default +# Check for async output +# NOTE: regex to match 1 or more digits works for both BSD and GNU grep +ansible-playbook -i inventory test_async.yml 2>&1 | tee async_test.out +grep "ASYNC OK .* jid=[0-9]\{1,\}" async_test.out +grep "ASYNC FAILED .* jid=[0-9]\{1,\}" async_test.out +rm -f async_test.out + # Hide skipped export ANSIBLE_DISPLAY_SKIPPED_HOSTS=0 diff --git a/test/integration/targets/callback_default/test_async.yml b/test/integration/targets/callback_default/test_async.yml new file mode 100644 index 0000000000..57294a4c00 --- /dev/null +++ b/test/integration/targets/callback_default/test_async.yml @@ -0,0 +1,14 @@ +--- +- hosts: testhost + gather_facts: no + tasks: + - name: test success async output + command: sleep 1 + async: 10 + poll: 1 + + - name: test failure async output + command: sleep 10 + async: 1 + poll: 1 + ignore_errors: yes |