Merge pull request #37895 from fj40crawler/fix-augeas-return-for-test

Change return value for salt/states/augeas.py to be True instead of N…
This commit is contained in:
Mike Place 2016-11-28 15:49:27 +02:00 committed by GitHub
commit c03b389422
2 changed files with 2 additions and 2 deletions

View file

@ -265,7 +265,7 @@ def change(name, context=None, changes=None, lens=None,
filename = re.sub('^/files|/$', '', context)
if __opts__['test']:
ret['result'] = None
ret['result'] = True
ret['comment'] = 'Executing commands'
if context:
ret['comment'] += ' in file "{0}":\n'.format(context)

View file

@ -84,7 +84,7 @@ class AugeasTestCase(TestCase):
comt = ('Executing commands in file "/files/etc/services":\n'
'ins service-name after service-name[last()]'
'\nset service-name[last()] zabbix-agent')
self.ret.update({'comment': comt, 'result': None})
self.ret.update({'comment': comt, 'result': True})
with patch.dict(augeas.__opts__, {'test': True}):
self.assertDictEqual(