mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
change arg to mocked to try test suite collision fix
This commit is contained in:
parent
958584c859
commit
5c7853ac8a
@ -574,13 +574,13 @@ def highstate(test=None,
|
||||
kwargs.get('__pub_jid'),
|
||||
pillar_enc=pillar_enc,
|
||||
proxy=__proxy__,
|
||||
mock=kwargs.get('mock', False))
|
||||
mocked=kwargs.get('mock', False))
|
||||
except NameError:
|
||||
st_ = salt.state.HighState(opts,
|
||||
pillar,
|
||||
kwargs.get('__pub_jid'),
|
||||
pillar_enc=pillar_enc,
|
||||
mock=kwargs.get('mock', False))
|
||||
mocked=kwargs.get('mock', False))
|
||||
|
||||
st_.push_active()
|
||||
try:
|
||||
@ -764,13 +764,13 @@ def sls(mods,
|
||||
kwargs.get('__pub_jid'),
|
||||
pillar_enc=pillar_enc,
|
||||
proxy=__proxy__,
|
||||
mock=kwargs.get('mock', False))
|
||||
mocked=kwargs.get('mock', False))
|
||||
except NameError:
|
||||
st_ = salt.state.HighState(opts,
|
||||
pillar,
|
||||
kwargs.get('__pub_jid'),
|
||||
pillar_enc=pillar_enc,
|
||||
mock=kwargs.get('mock', False))
|
||||
mocked=kwargs.get('mock', False))
|
||||
|
||||
umask = os.umask(0o77)
|
||||
if kwargs.get('cache'):
|
||||
|
@ -623,7 +623,7 @@ class State(object):
|
||||
'''
|
||||
Class used to execute salt states
|
||||
'''
|
||||
def __init__(self, opts, pillar=None, jid=None, pillar_enc=None, proxy=None, mock=False):
|
||||
def __init__(self, opts, pillar=None, jid=None, pillar_enc=None, proxy=None, mocked=False):
|
||||
if 'grains' not in opts:
|
||||
opts['grains'] = salt.loader.grains(opts)
|
||||
self.opts = opts
|
||||
@ -650,7 +650,7 @@ class State(object):
|
||||
self.jid = jid
|
||||
self.instance_id = str(id(self))
|
||||
self.inject_globals = {}
|
||||
self.mock = mock
|
||||
self.mocked = mocked
|
||||
|
||||
def _decrypt_pillar_override(self):
|
||||
'''
|
||||
@ -1675,7 +1675,7 @@ class State(object):
|
||||
|
||||
if 'result' not in ret or ret['result'] is False:
|
||||
self.states.inject_globals = inject_globals
|
||||
if self.mock:
|
||||
if self.mocked:
|
||||
ret = mock_ret(cdata)
|
||||
else:
|
||||
ret = self.states[cdata['full']](*cdata['args'],
|
||||
@ -3259,11 +3259,11 @@ class HighState(BaseHighState):
|
||||
# a stack of active HighState objects during a state.highstate run
|
||||
stack = []
|
||||
|
||||
def __init__(self, opts, pillar=None, jid=None, pillar_enc=None, proxy=None, mock=False):
|
||||
def __init__(self, opts, pillar=None, jid=None, pillar_enc=None, proxy=None, mocked=False):
|
||||
self.opts = opts
|
||||
self.client = salt.fileclient.get_file_client(self.opts)
|
||||
BaseHighState.__init__(self, opts)
|
||||
self.state = State(self.opts, pillar, jid, pillar_enc, proxy=proxy, mock=mock)
|
||||
self.state = State(self.opts, pillar, jid, pillar_enc, proxy=proxy, mocked=mocked)
|
||||
self.matcher = salt.minion.Matcher(self.opts)
|
||||
|
||||
# tracks all pydsl state declarations globally across sls files
|
||||
|
Loading…
Reference in New Issue
Block a user