Merge pull request #30550 from cachedout/fix_30113

Fixup for Let test=True option work for http.query state #30113
This commit is contained in:
Mike Place 2016-01-22 11:35:31 -07:00
commit 44dea20bf3
2 changed files with 2 additions and 2 deletions

View File

@ -71,7 +71,7 @@ def query(name, match=None, match_type='string', status=None, **kwargs):
ret['comment'] += 'Status {0} was not found, as specified.'.format(status)
ret['result'] = False
if __opts__['test'] and ret['result'] is True:
if __opts__['test'] is True:
ret['result'] = None
ret['comment'] += ' (TEST MODE'
if 'test_url' in kwargs:

View File

@ -37,7 +37,7 @@ class HttpTestCase(TestCase):
'comment': ' Either match text (match) or a '
'status code (status) is required.', 'data': {},
'name': 'salt', 'result': False},
{'changes': {}, 'comment': '', 'data': True, 'name': 'salt',
{'changes': {}, 'comment': ' (TEST MODE)', 'data': True, 'name': 'salt',
'result': None}]
self.assertDictEqual(http.query("salt"), ret[0])