mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Adding note about why salt.utils.versions is being re-imported. Adding a test for local_batch.
This commit is contained in:
parent
808805fd3d
commit
85cef126e0
2 changed files with 14 additions and 0 deletions
|
@ -559,6 +559,10 @@ class LocalClient(object):
|
|||
{'stewart': {...}}
|
||||
'''
|
||||
if 'expr_form' in kwargs:
|
||||
# We need to report salt.utils.versions here
|
||||
# even though it has already been imported.
|
||||
# when cmd_batch is called via the NetAPI
|
||||
# the module is unavailable.
|
||||
import salt.utils.versions
|
||||
salt.utils.versions.warn_until(
|
||||
'Fluorine',
|
||||
|
|
|
@ -37,6 +37,16 @@ class NetapiClientTest(TestCase):
|
|||
ret = self.netapi.run(low)
|
||||
self.assertEqual(ret, {'minion': True, 'sub_minion': True, 'localhost': True})
|
||||
|
||||
def test_local_batch(self):
|
||||
low = {'client': 'local_batch', 'tgt': '*', 'fun': 'test.ping'}
|
||||
low.update(self.eauth_creds)
|
||||
|
||||
ret = self.netapi.run(low)
|
||||
rets = []
|
||||
for _ret in ret:
|
||||
rets.append(_ret)
|
||||
self.assertEqual(rets, [{u'sub_minion': True}, {u'minion': True}, {'localhost': True}])
|
||||
|
||||
def test_local_async(self):
|
||||
low = {'client': 'local_async', 'tgt': '*', 'fun': 'test.ping'}
|
||||
low.update(self.eauth_creds)
|
||||
|
|
Loading…
Add table
Reference in a new issue