-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Test custom grains matcher #34324
Test custom grains matcher #34324
Conversation
@@ -159,6 +161,11 @@ def test_grain(self): | |||
data = '\n'.join(data) | |||
self.assertIn('sub_minion', data) | |||
self.assertNotIn('minion', data.replace('sub_minion', 'stub')) | |||
# Custom grain | |||
data = self.run_salt('-t 1 -G "match:maker" test.ping') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does the {'match': 'maker'}
grain come from? I think that is why this test is failing. There isn't a return from the minions on this custom grain call. The first assertIn
is passing because 'minion' is found in ['No minions matched the target. No command was sent, no jid was assigned.']
.
You could maybe use the custom grains files in integration/files/file/base/_grains/*
for this test instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I think I forgot to git add
it. Derp.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, that would make more sense!
* upstream/develop: Test custom grains matcher (saltstack#34324)
No description provided.