win_psexec: make the tests more stable (#53716)
(cherry picked from commit 33939f7fe8
)
This commit is contained in:
parent
b4aa70e0a1
commit
a36b86c0c0
2 changed files with 4 additions and 7 deletions
|
@ -1,2 +1 @@
|
|||
shippable/windows/group3
|
||||
unstable
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue