Fix test=True for states without changes

If no changes are going to be made, result should be True or False, None
is reserved for when changes are going to be made.
This commit is contained in:
Colton Myers 2014-05-19 11:16:17 -06:00
parent 78c8190373
commit 5eb941b8fb

View File

@ -57,7 +57,7 @@ def succeed_without_changes(name):
'comment': 'Success!' 'comment': 'Success!'
} }
if __opts__['test']: if __opts__['test']:
ret['result'] = None ret['result'] = True
ret['comment'] = 'If we weren\'t testing, this would be a success!' ret['comment'] = 'If we weren\'t testing, this would be a success!'
return ret return ret
@ -79,7 +79,7 @@ def fail_without_changes(name):
} }
if __opts__['test']: if __opts__['test']:
ret['result'] = None 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