Merge pull request #43707 from terminalmage/issue43373

Add missing support for use/use_in requisites to state.sls_id
This commit is contained in:
Nicole Thomas 2017-10-01 10:07:52 -04:00 committed by GitHub
commit a2161efda3
2 changed files with 9 additions and 0 deletions

View file

@ -1303,6 +1303,12 @@ def sls_id(id_, mods, test=None, queue=False, **kwargs):
finally:
st_.pop_active()
errors += st_.state.verify_high(high_)
# Apply requisites to high data
high_, req_in_errors = st_.state.requisite_in(high_)
if req_in_errors:
# This if statement should not be necessary if there were no errors,
# but it is required to get the unit tests to pass.
errors.extend(req_in_errors)
if errors:
__context__['retcode'] = 1
return errors

View file

@ -132,6 +132,9 @@ class MockState(object):
data = data
return True
def requisite_in(self, data): # pylint: disable=unused-argument
return data, []
class HighState(object):
'''
Mock HighState class