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:
Erik Johnson 2016-10-10 18:00:42 -05:00 committed by Nicole Thomas
parent 3ce4897b97
commit bdbf1619cb

View file

@ -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'],