-
Notifications
You must be signed in to change notification settings - Fork 203
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
Add support for exported resource mocks #2
Comments
Hi, I would like to know how I can test if an exported resource has indeed been exported. Since this ticket in a year old, maybe there now is a way to do this ? Thanks in advance |
The current object against which rspec-puppet checks is the completely compiled catalog, which only contains exported resources that are realized with the When working on #51 I worked for a while on trying to verify that resources were actually exported, but the only way I could think is to create a node definition in One possible solution: there is a |
👍 |
this has been supported for a while, using a syntax like: it do
expect(exported_resources).to contain_nagios_host("foo.example")
.with_address("10.11.12.13")
end (there may be more pretty ways of writing this as well) |
What is still impossible, as far as I can tell, is to test the collection operator, ie. that the correct subset of exported resources are realized in your catalog. If I read the code correctly, it is impossible to check whether collect works, since the I did manage to hack together a matcher for the This is hardly a usable workaround, but it may point in a possible direction for implementation. |
Like what you have done with the fact mocks, but with exported resources.
This feature would kick arse.
The text was updated successfully, but these errors were encountered: