mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Adding some integration tests.
This commit is contained in:
parent
96e8b90d1e
commit
e6b750d6a1
2 changed files with 31 additions and 0 deletions
|
@ -147,3 +147,33 @@ class StdTest(ModuleCase):
|
|||
|
||||
finally:
|
||||
os.unlink(key_file)
|
||||
|
||||
def test_missing_minion_list(self):
|
||||
'''
|
||||
test cmd with missing minion in nodegroup
|
||||
'''
|
||||
ret = self.client.cmd(
|
||||
'minion,ghostminion',
|
||||
'test.ping',
|
||||
tgt_type='list'
|
||||
)
|
||||
self.assertIn('minion', ret)
|
||||
self.assertIn('ghostminion', ret)
|
||||
self.assertEqual(True, ret['minion'])
|
||||
self.assertEqual(u'Minion did not return. [No response]',
|
||||
ret['ghostminion'])
|
||||
|
||||
def test_missing_minion_nodegroup(self):
|
||||
'''
|
||||
test cmd with missing minion in nodegroup
|
||||
'''
|
||||
ret = self.client.cmd(
|
||||
'missing_minion',
|
||||
'test.ping',
|
||||
tgt_type='nodegroup'
|
||||
)
|
||||
self.assertIn('minion', ret)
|
||||
self.assertIn('ghostminion', ret)
|
||||
self.assertEqual(True, ret['minion'])
|
||||
self.assertEqual(u'Minion did not return. [No response]',
|
||||
ret['ghostminion'])
|
||||
|
|
|
@ -78,6 +78,7 @@ nodegroups:
|
|||
redundant_minions: N@min or N@mins
|
||||
nodegroup_loop_a: N@nodegroup_loop_b
|
||||
nodegroup_loop_b: N@nodegroup_loop_a
|
||||
missing_minion: L@minion,ghostminion
|
||||
|
||||
|
||||
mysql.host: localhost
|
||||
|
|
Loading…
Add table
Reference in a new issue