summaryrefslogtreecommitdiff
path: root/test/integration/targets
diff options
context:
space:
mode:
authorBrian Coca <brian.coca+git@gmail.com>2017-04-21 16:17:12 -0400
committerBrian Coca <brian.coca+git@gmail.com>2017-04-25 14:51:22 -0400
commitd1c14e8aa40011a62b331097f4dd507d2dbc1768 (patch)
treed96ffb04a51d0e756ffe67b512473d3cf773fa1a /test/integration/targets
parent6ada5cc07416713ee20073b66f242ec935549ada (diff)
downloadansible-d1c14e8aa40011a62b331097f4dd507d2dbc1768.tar.gz
moved to exceptions for basic skip/fails
better handling of checkmode and async fix test to follow new flow control (cherry picked from commit e29dc49a49eb042cb2f707eb8e9e030a718677ed)
Diffstat (limited to 'test/integration/targets')
-rw-r--r--test/integration/targets/module_utils/module_utils_test.yml6
-rw-r--r--test/integration/targets/script/tasks/main.yml14
2 files changed, 17 insertions, 3 deletions
diff --git a/test/integration/targets/module_utils/module_utils_test.yml b/test/integration/targets/module_utils/module_utils_test.yml
index a131727084..ee737c6cdc 100644
--- a/test/integration/targets/module_utils/module_utils_test.yml
+++ b/test/integration/targets/module_utils/module_utils_test.yml
@@ -36,7 +36,7 @@
- name: Make sure the we used the local facts.py, not the one shipped with ansible
assert:
that:
- - 'result["data"] == "overridden facts.py"'
+ - result["data"] == "overridden facts.py"
- name: Test that importing a module that only exists inside of a submodule does not work
test_failure:
@@ -47,5 +47,5 @@
- name: Make sure we failed in AnsiBallZ
assert:
that:
- - 'result["failed"] == True'
- - '"Could not find imported module support code for test_failure. Looked for either foo.py or zebra.py" == result["msg"]'
+ - result|failed
+ - result['msg'] == "Could not find imported module support code for test_failure. Looked for either foo.py or zebra.py"
diff --git a/test/integration/targets/script/tasks/main.yml b/test/integration/targets/script/tasks/main.yml
index 2c0f1f02ad..7b31444190 100644
--- a/test/integration/targets/script/tasks/main.yml
+++ b/test/integration/targets/script/tasks/main.yml
@@ -69,3 +69,17 @@
that:
- "script_result1|changed"
- "script_result2.state == 'absent'"
+
+# async
+- name: test task failure with async param
+
+ script: /some/script.sh
+ async: 2
+ ignore_errors: true
+ register: script_result3
+
+- name: assert task with async param failed
+ assert:
+ that:
+ - script_result3|failed
+ - script_result3.msg == "async is not supported for this task."