mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
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:
commit
44dea20bf3
@ -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:
|
||||
|
@ -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])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user