mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 17:50:20 +00:00
Less flaky mine tests
This commit is contained in:
parent
3709ed745e
commit
6e0b61baa9
1 changed files with 13 additions and 1 deletions
|
@ -72,6 +72,9 @@ class MineTest(ModuleCase):
|
|||
'''
|
||||
Test mine.flush
|
||||
'''
|
||||
# TODO The calls to sleep were added in an attempt to make this tests
|
||||
# less flaky. If we still see it fail we need to look for a more robust
|
||||
# solution.
|
||||
for minion_id in ('minion', 'sub_minion'):
|
||||
self.assertTrue(
|
||||
self.run_function(
|
||||
|
@ -80,7 +83,7 @@ class MineTest(ModuleCase):
|
|||
minion_tgt=minion_id
|
||||
)
|
||||
)
|
||||
time.sleep(1)
|
||||
time.sleep(1)
|
||||
for minion_id in ('minion', 'sub_minion'):
|
||||
ret = self.run_function(
|
||||
'mine.get',
|
||||
|
@ -88,12 +91,14 @@ class MineTest(ModuleCase):
|
|||
minion_tgt=minion_id
|
||||
)
|
||||
self.assertEqual(ret[minion_id]['id'], minion_id)
|
||||
time.sleep(1)
|
||||
self.assertTrue(
|
||||
self.run_function(
|
||||
'mine.flush',
|
||||
minion_tgt='minion'
|
||||
)
|
||||
)
|
||||
time.sleep(1)
|
||||
ret_flushed = self.run_function(
|
||||
'mine.get',
|
||||
['*', 'grains.items']
|
||||
|
@ -105,12 +110,16 @@ class MineTest(ModuleCase):
|
|||
'''
|
||||
Test mine.delete
|
||||
'''
|
||||
# TODO The calls to sleep were added in an attempt to make this tests
|
||||
# less flaky. If we still see it fail we need to look for a more robust
|
||||
# solution.
|
||||
self.assertTrue(
|
||||
self.run_function(
|
||||
'mine.send',
|
||||
['grains.items']
|
||||
)
|
||||
)
|
||||
time.sleep(1)
|
||||
# Smoke testing that grains should now exist in the mine
|
||||
ret_grains = self.run_function(
|
||||
'mine.get',
|
||||
|
@ -123,6 +132,7 @@ class MineTest(ModuleCase):
|
|||
['test.arg', 'foo=bar', 'fnord=roscivs'],
|
||||
)
|
||||
)
|
||||
time.sleep(1)
|
||||
ret_args = self.run_function(
|
||||
'mine.get',
|
||||
['minion', 'test.arg']
|
||||
|
@ -144,6 +154,7 @@ class MineTest(ModuleCase):
|
|||
['test.echo', 'foo']
|
||||
)
|
||||
)
|
||||
time.sleep(1)
|
||||
ret_echo = self.run_function(
|
||||
'mine.get',
|
||||
['minion', 'test.echo']
|
||||
|
@ -156,6 +167,7 @@ class MineTest(ModuleCase):
|
|||
['test.arg']
|
||||
)
|
||||
)
|
||||
time.sleep(1)
|
||||
ret_arg_deleted = self.run_function(
|
||||
'mine.get',
|
||||
['minion', 'test.arg']
|
||||
|
|
Loading…
Add table
Reference in a new issue