"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/integration/netapi/test_client.py" between
salt-2019.2.0.tar.gz and salt-2019.2.1.tar.gz

About: SaltStack is a systems management software for data center automation, cloud orchestration, server provisioning, configuration management and more. Community version.

test_client.py  (salt-2019.2.0):test_client.py  (salt-2019.2.1)
skipping to change at line 38 skipping to change at line 38
self.netapi = salt.netapi.NetapiClient(opts) self.netapi = salt.netapi.NetapiClient(opts)
def tearDown(self): def tearDown(self):
del self.netapi del self.netapi
def test_local(self): def test_local(self):
low = {'client': 'local', 'tgt': '*', 'fun': 'test.ping'} low = {'client': 'local', 'tgt': '*', 'fun': 'test.ping'}
low.update(self.eauth_creds) low.update(self.eauth_creds)
ret = self.netapi.run(low) ret = self.netapi.run(low)
# If --proxy is set, it will cause an extra minion_id to be in the
# response. Since there's not a great way to know if the test
# runner's proxy minion is running, and we're not testing proxy
# minions here anyway, just remove it from the response.
ret.pop('proxytest', None)
self.assertEqual(ret, {'minion': True, 'sub_minion': True}) self.assertEqual(ret, {'minion': True, 'sub_minion': True})
def test_local_batch(self): def test_local_batch(self):
low = {'client': 'local_batch', 'tgt': '*', 'fun': 'test.ping'} low = {'client': 'local_batch', 'tgt': '*', 'fun': 'test.ping'}
low.update(self.eauth_creds) low.update(self.eauth_creds)
ret = self.netapi.run(low) ret = self.netapi.run(low)
rets = [] rets = []
for _ret in ret: for _ret in ret:
rets.append(_ret) rets.append(_ret)
skipping to change at line 61 skipping to change at line 66
def test_local_async(self): def test_local_async(self):
low = {'client': 'local_async', 'tgt': '*', 'fun': 'test.ping'} low = {'client': 'local_async', 'tgt': '*', 'fun': 'test.ping'}
low.update(self.eauth_creds) low.update(self.eauth_creds)
ret = self.netapi.run(low) ret = self.netapi.run(low)
# Remove all the volatile values before doing the compare. # Remove all the volatile values before doing the compare.
self.assertIn('jid', ret) self.assertIn('jid', ret)
ret.pop('jid', None) ret.pop('jid', None)
ret['minions'] = sorted(ret['minions']) ret['minions'] = sorted(ret['minions'])
try:
# If --proxy is set, it will cause an extra minion_id to be in the
# response. Since there's not a great way to know if the test
# runner's proxy minion is running, and we're not testing proxy
# minions here anyway, just remove it from the response.
ret['minions'].remove('proxytest')
except ValueError:
pass
self.assertEqual(ret, {'minions': sorted(['minion', 'sub_minion'])}) self.assertEqual(ret, {'minions': sorted(['minion', 'sub_minion'])})
def test_wheel(self): def test_wheel(self):
low = {'client': 'wheel', 'fun': 'key.list_all'} low = {'client': 'wheel', 'fun': 'key.list_all'}
low.update(self.eauth_creds) low.update(self.eauth_creds)
ret = self.netapi.run(low) ret = self.netapi.run(low)
# Remove all the volatile values before doing the compare. # Remove all the volatile values before doing the compare.
self.assertIn('tag', ret) self.assertIn('tag', ret)
 End of changes. 2 change blocks. 
0 lines changed or deleted 13 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)