summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Borean <jborean93@gmail.com>2019-03-13 11:22:59 +1000
committerToshio Kuratomi <a.badger@gmail.com>2019-03-18 14:33:40 -0700
commita36b86c0c00bfa34a17976b031631f4e42407272 (patch)
tree6218fabdf9ef5e82d24e77893cb2baf540aa97db
parentb4aa70e0a1f01069d755ec8e0a42ce8b8468d2a9 (diff)
downloadansible-a36b86c0c00bfa34a17976b031631f4e42407272.tar.gz
win_psexec: make the tests more stable (#53716)
(cherry picked from commit 33939f7fe8bb214cf87260fafb2f6be683ce5fea)
-rw-r--r--test/integration/targets/win_psexec/aliases1
-rw-r--r--test/integration/targets/win_psexec/tasks/main.yml10
2 files changed, 4 insertions, 7 deletions
diff --git a/test/integration/targets/win_psexec/aliases b/test/integration/targets/win_psexec/aliases
index a4da730eaa..3cf5b97e80 100644
--- a/test/integration/targets/win_psexec/aliases
+++ b/test/integration/targets/win_psexec/aliases
@@ -1,2 +1 @@
shippable/windows/group3
-unstable
diff --git a/test/integration/targets/win_psexec/tasks/main.yml b/test/integration/targets/win_psexec/tasks/main.yml
index a1245cdc31..a09401ccff 100644
--- a/test/integration/targets/win_psexec/tasks/main.yml
+++ b/test/integration/targets/win_psexec/tasks/main.yml
@@ -41,12 +41,10 @@
system: yes
nobanner: true
register: whoami_as_system
-
-- name: Test whoami as SYSTEM
- assert:
- that:
- - whoami_as_system.rc == 0
- - whoami_as_system.stdout == 'nt authority\system'
+ # Seems to be a bug with PsExec where the stdout can be empty, just retry the task to make this test a bit more stable
+ until: whoami_as_system.rc == 0 and whoami_as_system.stdout == 'nt authority\system'
+ retries: 3
+ delay: 2
# FIXME: Behaviour is not consistent on all Windows systems
#- name: Run whoami as ELEVATED