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

Test custom grains matcher #34324

Merged
merged 3 commits into from
Jun 28, 2016

Conversation

cachedout
Copy link
Contributor

No description provided.

@@ -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')
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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!

@rallytime rallytime added the pending-changes The pull request needs additional changes before it can be merged label Jun 28, 2016
@rallytime rallytime removed the pending-changes The pull request needs additional changes before it can be merged label Jun 28, 2016
@rallytime rallytime merged commit e81bd6e into saltstack:develop Jun 28, 2016
@rallytime rallytime added the bugfix-bckport will be be back-ported to an older release branch by creating a PR against that branch label Jun 28, 2016
gitebra pushed a commit to gitebra/salt that referenced this pull request Jun 28, 2016
* upstream/develop:
  Test custom grains matcher (saltstack#34324)
@rallytime rallytime added ZZZ[Done]-back-ported-bf RETIRED The pull request has been back-ported to an older branch. and removed bugfix-bckport will be be back-ported to an older release branch by creating a PR against that branch labels Jun 28, 2016
rallytime pushed a commit that referenced this pull request Jun 28, 2016
* Add test to match against custom grains

* Lint

* Forgot to add custom grain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ZZZ[Done]-back-ported-bf RETIRED The pull request has been back-ported to an older branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants