change arg to mocked to try test suite collision fix

This commit is contained in:
Thomas S Hatch 2016-01-05 10:13:14 -07:00 committed by rallytime
parent 2fbdcda703
commit f9480f66d8
2 changed files with 9 additions and 9 deletions

View file

@ -549,12 +549,12 @@ def highstate(test=None,
pillar,
kwargs.get('__pub_jid'),
proxy=__proxy__,
mock=kwargs.get('mock', False))
mocked=kwargs.get('mock', False))
except NameError:
st_ = salt.state.HighState(opts,
pillar,
kwargs.get('__pub_jid'),
mock=kwargs.get('mock', False))
mocked=kwargs.get('mock', False))
st_.push_active()
try:
@ -717,12 +717,12 @@ def sls(mods,
pillar,
kwargs.get('__pub_jid'),
proxy=__proxy__,
mock=kwargs.get('mock', False))
mocked=kwargs.get('mock', False))
except NameError:
st_ = salt.state.HighState(opts,
pillar,
kwargs.get('__pub_jid'),
mock=kwargs.get('mock', False))
mocked=kwargs.get('mock', False))
umask = os.umask(0o77)
if kwargs.get('cache'):

View file

@ -618,7 +618,7 @@ class State(object):
'''
Class used to execute salt states
'''
def __init__(self, opts, pillar=None, jid=None, proxy=None, mock=False):
def __init__(self, opts, pillar=None, jid=None, proxy=None, mocked=False):
if 'grains' not in opts:
opts['grains'] = salt.loader.grains(opts)
self.opts = opts
@ -634,7 +634,7 @@ class State(object):
self.jid = jid
self.instance_id = str(id(self))
self.inject_globals = {}
self.mock = mock
self.mocked = mocked
def _gather_pillar(self):
'''
@ -1617,7 +1617,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'],
@ -3193,11 +3193,11 @@ class HighState(BaseHighState):
# a stack of active HighState objects during a state.highstate run
stack = []
def __init__(self, opts, pillar=None, jid=None, proxy=None, mock=False):
def __init__(self, opts, pillar=None, jid=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, proxy=proxy, mock=mock)
self.state = State(self.opts, pillar, jid, proxy=proxy, mocked=mocked)
self.matcher = salt.minion.Matcher(self.opts)
# tracks all pydsl state declarations globally across sls files