mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Add compound matcher tests
This commit is contained in:
parent
193a64e33e
commit
a58202c2f7
1 changed files with 17 additions and 0 deletions
|
@ -27,6 +27,23 @@ class MatchTest(integration.ShellCase, integration.ShellCaseCommonTestsMixIn):
|
|||
self.assertIn('minion', data)
|
||||
self.assertIn('sub_minion', data)
|
||||
|
||||
def test_compound(self):
|
||||
'''
|
||||
test salt compound matcher
|
||||
'''
|
||||
data = self.run_salt('-C "min* and G@test_grain:cheese" test.ping')
|
||||
data = '\n'.join(data)
|
||||
self.assertIn('minion', data)
|
||||
self.assertNotIn('sub_minion', data)
|
||||
data = self.run_salt('-C "min* and not G@test_grain:foo" test.ping')
|
||||
data = '\n'.join(data)
|
||||
self.assertIn('minion', data)
|
||||
self.assertNotIn('sub_minion', data)
|
||||
data = self.run_salt('-C "min* not G@test_grain:foo" test.ping')
|
||||
data = '\n'.join(data)
|
||||
self.assertIn('minion', data)
|
||||
self.assertNotIn('sub_minion', data)
|
||||
|
||||
def test_glob(self):
|
||||
'''
|
||||
test salt glob matcher
|
||||
|
|
Loading…
Add table
Reference in a new issue