Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Back-port #48959 to 2017.7.8 #48979

Merged
merged 2 commits into from
Aug 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tests/integration/cli/test_grains.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

# Import Salt Testing Libs
from tests.support.case import ShellCase, SSHCase
from tests.support.helpers import flaky


class GrainsTargetingTest(ShellCase):
Expand Down Expand Up @@ -52,6 +53,7 @@ def test_grains_targeting_minion_id_running(self):
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.
Expand All @@ -70,7 +72,7 @@ def test_grains_targeting_disconnected(self):
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)

Expand Down
2 changes: 2 additions & 0 deletions tests/integration/shell/test_matcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,13 @@ def test_coumpound_pcre_grain_regex(self):
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
Expand Down