"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "salt/states/test.py" between
salt-2019.2.0.tar.gz and salt-2019.2.1.tar.gz

About: SaltStack is a systems management software for data center automation, cloud orchestration, server provisioning, configuration management and more. Community version.

test.py  (salt-2019.2.0):test.py  (salt-2019.2.1)
skipping to change at line 68 skipping to change at line 68
def nop(name, **kwargs): def nop(name, **kwargs):
''' '''
A no-op state that does nothing. Useful in conjunction with the `use` A no-op state that does nothing. Useful in conjunction with the `use`
requisite, or in templates which could otherwise be empty due to jinja requisite, or in templates which could otherwise be empty due to jinja
rendering rendering
.. versionadded:: 2015.8.1 .. versionadded:: 2015.8.1
''' '''
return succeed_without_changes(name) return succeed_without_changes(name)
def succeed_without_changes(name): def succeed_without_changes(name, **kwargs): # pylint: disable=unused-argument
''' '''
Returns successful. Returns successful.
.. versionadded:: 2014.7.0 .. versionadded:: 2014.7.0
name name
A unique string. A unique string.
''' '''
ret = { ret = {
'name': name, 'name': name,
'changes': {}, 'changes': {},
'result': True, 'result': True,
'comment': 'Success!' 'comment': 'Success!'
} }
return ret return ret
def fail_without_changes(name): def fail_without_changes(name, **kwargs): # pylint: disable=unused-argument
''' '''
Returns failure. Returns failure.
.. versionadded:: 2014.7.0 .. versionadded:: 2014.7.0
name: name:
A unique string. A unique string.
''' '''
ret = { ret = {
'name': name, 'name': name,
skipping to change at line 107 skipping to change at line 107
'result': False, 'result': False,
'comment': 'Failure!' 'comment': 'Failure!'
} }
if __opts__['test']: if __opts__['test']:
ret['result'] = False ret['result'] = False
ret['comment'] = 'If we weren\'t testing, this would be a failure!' ret['comment'] = 'If we weren\'t testing, this would be a failure!'
return ret return ret
def succeed_with_changes(name): def succeed_with_changes(name, **kwargs): # pylint: disable=unused-argument
''' '''
Returns successful and changes is not empty Returns successful and changes is not empty
.. versionadded:: 2014.7.0 .. versionadded:: 2014.7.0
name: name:
A unique string. A unique string.
''' '''
ret = { ret = {
'name': name, 'name': name,
skipping to change at line 139 skipping to change at line 139
} }
} }
if __opts__['test']: if __opts__['test']:
ret['result'] = None ret['result'] = None
ret['comment'] = ('If we weren\'t testing, this would be successful ' ret['comment'] = ('If we weren\'t testing, this would be successful '
'with changes') 'with changes')
return ret return ret
def fail_with_changes(name): def fail_with_changes(name, **kwargs): # pylint: disable=unused-argument
''' '''
Returns failure and changes is not empty. Returns failure and changes is not empty.
.. versionadded:: 2014.7.0 .. versionadded:: 2014.7.0
name: name:
A unique string. A unique string.
''' '''
ret = { ret = {
'name': name, 'name': name,
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)