mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
remove localhost from tests
now that enable_ssh_minions is turned off, remove localhost from returns.
This commit is contained in:
parent
7b168a5aac
commit
6bc44c91c4
2 changed files with 8 additions and 9 deletions
|
@ -179,7 +179,7 @@ class TestSaltAPIHandler(_SaltnadoIntegrationTestCase):
|
|||
# TODO: verify pub function? Maybe look at how we test the publisher
|
||||
self.assertEqual(len(ret), 1)
|
||||
self.assertIn('jid', ret[0])
|
||||
self.assertEqual(ret[0]['minions'], sorted(['minion', 'sub_minion', 'localhost']))
|
||||
self.assertEqual(ret[0]['minions'], sorted(['minion', 'sub_minion']))
|
||||
|
||||
def test_multi_local_async_post(self):
|
||||
low = [{'client': 'local_async',
|
||||
|
@ -205,8 +205,8 @@ class TestSaltAPIHandler(_SaltnadoIntegrationTestCase):
|
|||
self.assertEqual(len(ret), 2)
|
||||
self.assertIn('jid', ret[0])
|
||||
self.assertIn('jid', ret[1])
|
||||
self.assertEqual(ret[0]['minions'], sorted(['minion', 'sub_minion', 'localhost']))
|
||||
self.assertEqual(ret[1]['minions'], sorted(['minion', 'sub_minion', 'localhost']))
|
||||
self.assertEqual(ret[0]['minions'], sorted(['minion', 'sub_minion']))
|
||||
self.assertEqual(ret[1]['minions'], sorted(['minion', 'sub_minion']))
|
||||
|
||||
def test_multi_local_async_post_multitoken(self):
|
||||
low = [{'client': 'local_async',
|
||||
|
@ -240,8 +240,8 @@ class TestSaltAPIHandler(_SaltnadoIntegrationTestCase):
|
|||
self.assertIn('jid', ret[0]) # the first 2 are regular returns
|
||||
self.assertIn('jid', ret[1])
|
||||
self.assertIn('Authentication error occurred.', ret[2]) # bad auth
|
||||
self.assertEqual(ret[0]['minions'], sorted(['minion', 'sub_minion', 'localhost']))
|
||||
self.assertEqual(ret[1]['minions'], sorted(['minion', 'sub_minion', 'localhost']))
|
||||
self.assertEqual(ret[0]['minions'], sorted(['minion', 'sub_minion']))
|
||||
self.assertEqual(ret[1]['minions'], sorted(['minion', 'sub_minion']))
|
||||
|
||||
def test_simple_local_async_post_no_tgt(self):
|
||||
low = [{'client': 'local_async',
|
||||
|
@ -299,7 +299,7 @@ class TestSaltAPIHandler(_SaltnadoIntegrationTestCase):
|
|||
)
|
||||
response_obj = salt.utils.json.loads(response.body)
|
||||
self.assertEqual(len(response_obj['return']), 1)
|
||||
self.assertEqual(set(response_obj['return'][0]), set(['localhost', 'minion', 'sub_minion']))
|
||||
self.assertEqual(set(response_obj['return'][0]), set(['minion', 'sub_minion']))
|
||||
|
||||
# runner_async tests
|
||||
def test_simple_local_runner_async_post(self):
|
||||
|
|
|
@ -35,7 +35,7 @@ class NetapiClientTest(TestCase):
|
|||
low.update(self.eauth_creds)
|
||||
|
||||
ret = self.netapi.run(low)
|
||||
self.assertEqual(ret, {'minion': True, 'sub_minion': True, 'localhost': True})
|
||||
self.assertEqual(ret, {'minion': True, 'sub_minion': True})
|
||||
|
||||
def test_local_batch(self):
|
||||
low = {'client': 'local_batch', 'tgt': '*', 'fun': 'test.ping'}
|
||||
|
@ -45,7 +45,6 @@ class NetapiClientTest(TestCase):
|
|||
rets = []
|
||||
for _ret in ret:
|
||||
rets.append(_ret)
|
||||
self.assertIn({'localhost': True}, rets)
|
||||
self.assertIn({'sub_minion': True}, rets)
|
||||
self.assertIn({'minion': True}, rets)
|
||||
|
||||
|
@ -59,7 +58,7 @@ class NetapiClientTest(TestCase):
|
|||
self.assertIn('jid', ret)
|
||||
ret.pop('jid', None)
|
||||
ret['minions'] = sorted(ret['minions'])
|
||||
self.assertEqual(ret, {'minions': sorted(['minion', 'sub_minion', 'localhost'])})
|
||||
self.assertEqual(ret, {'minions': sorted(['minion', 'sub_minion'])})
|
||||
|
||||
def test_wheel(self):
|
||||
low = {'client': 'wheel', 'fun': 'key.list_all'}
|
||||
|
|
Loading…
Add table
Reference in a new issue