mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Check for test=True in salt.wait_for_event orchestration events (#36897)
This prevents a wait_for_event from hanging the orchestration job when test=True.
This commit is contained in:
parent
3ce4897b97
commit
bdbf1619cb
1 changed files with 6 additions and 0 deletions
|
@ -502,6 +502,12 @@ def wait_for_event(
|
|||
'''
|
||||
ret = {'name': name, 'changes': {}, 'comment': '', 'result': False}
|
||||
|
||||
if __opts__.get('test'):
|
||||
ret['comment'] = \
|
||||
'Orchestration would wait for event \'{0}\''.format(name)
|
||||
ret['result'] = None
|
||||
return ret
|
||||
|
||||
sevent = salt.utils.event.get_event(
|
||||
'master',
|
||||
__opts__['sock_dir'],
|
||||
|
|
Loading…
Add table
Reference in a new issue