summaryrefslogtreecommitdiff
path: root/test/integration/targets/win_shell
diff options
context:
space:
mode:
authorMatt Davis <nitzmahone@users.noreply.github.com>2017-07-05 10:05:07 -0700
committerGitHub <noreply@github.com>2017-07-05 10:05:07 -0700
commit08af853ee9333b0d1339e132debc9fed69a79638 (patch)
tree9c79c879e37ed9da9d7648b9544e41df6b2d7aaa /test/integration/targets/win_shell
parent1d62283796c476f9955a7c7fba25fd49d8d9eedf (diff)
downloadansible-08af853ee9333b0d1339e132debc9fed69a79638.tar.gz
fix win_shell/win_command nonzero RC failure setting (#26443)
* as a result of recent core engine changes to ignore rc, modules are responsible to set `failed` on nonzero RC if they want that behavior * the `failed` filter currently triggers on nonzero RC, which caused the tests to false-pass * updated tests to explicitly check both rc and failed keys, as well as using the failed filter.
Diffstat (limited to 'test/integration/targets/win_shell')
-rw-r--r--test/integration/targets/win_shell/tasks/main.yml2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/integration/targets/win_shell/tasks/main.yml b/test/integration/targets/win_shell/tasks/main.yml
index 7d6ecf52c6..89d011d8bd 100644
--- a/test/integration/targets/win_shell/tasks/main.yml
+++ b/test/integration/targets/win_shell/tasks/main.yml
@@ -47,6 +47,7 @@
assert:
that:
- shellout|failed
+ - shellout.failed == true # check the failure key explicitly, since failed does magic with RC
- shellout|changed
- shellout.cmd == 'bogus_command1234'
- shellout.delta is match('^\d:(\d){2}:(\d){2}.(\d){6}$')
@@ -147,6 +148,7 @@
assert:
that:
- shellout|failed
+ - shellout.failed == True # check the failure key explicitly, since failed does magic with RC
- shellout.rc == 254
- name: run something via cmd that will fail in powershell