mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 00:55:19 +00:00
Merge pull request #48979 from rallytime/bp-48959
Back-port #48959 to 2017.7.8
This commit is contained in:
commit
22713be9c1
@ -21,6 +21,7 @@ import salt.utils
|
||||
|
||||
# Import Salt Testing Libs
|
||||
from tests.support.case import ShellCase, SSHCase
|
||||
from tests.support.helpers import flaky
|
||||
|
||||
|
||||
class GrainsTargetingTest(ShellCase):
|
||||
@ -52,6 +53,7 @@ class GrainsTargetingTest(ShellCase):
|
||||
sub_minion = self.run_salt('-G \'id:sub_minion\' test.ping')
|
||||
self.assertEqual(sorted(sub_minion), sorted(['sub_minion:', ' True']))
|
||||
|
||||
@flaky
|
||||
def test_grains_targeting_disconnected(self):
|
||||
'''
|
||||
Tests return of minion using grains targeting on a disconnected minion.
|
||||
@ -70,7 +72,7 @@ class GrainsTargetingTest(ShellCase):
|
||||
for item in self.run_salt('-t 1 -G \'id:disconnected\' test.ping', timeout=40):
|
||||
if item != 'disconnected:':
|
||||
ret = item.strip()
|
||||
self.assertEqual(ret, test_ret)
|
||||
assert ret == test_ret
|
||||
finally:
|
||||
os.unlink(key_file)
|
||||
|
||||
|
@ -94,11 +94,13 @@ class MatchTest(ShellCase, ShellCaseCommonTestsMixin):
|
||||
assert minion_in_returns('minion', data) is True
|
||||
assert minion_in_returns('sub_minion', data) is True
|
||||
|
||||
@flaky
|
||||
def test_compound_pillar(self):
|
||||
data = self.run_salt("-C 'I%@companions%three%sarah*' test.ping")
|
||||
assert minion_in_returns('minion', data) is True
|
||||
assert minion_in_returns('sub_minion', data) is True
|
||||
|
||||
@flaky
|
||||
def test_coumpound_pillar_pcre(self):
|
||||
data = self.run_salt("-C 'J%@knights%^(Lancelot|Galahad)$' test.ping")
|
||||
assert minion_in_returns('minion', data) is True
|
||||
|
Loading…
Reference in New Issue
Block a user