-
Notifications
You must be signed in to change notification settings - Fork 58
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
Reuse the same test for multiple test suites in one cookbook #97
Comments
@ceilfors We need to add attributes support into kitchen-inspec. Instead of having a separate attributes yml file, those should be defined in |
+1 for this. We have lots of server cookbooks with an "active" and "standby" suite where 90% of the configuration and hence the tests for active vs standby servers is the same. So obviously we would like to use the same tests for both suites to cover that 90%. Similar situations for primary vs secondary servers in a cluster, etc. |
For now we can use: https://github.com/chef/kitchen-inspec/blob/master/README.md#use-remote-inspec-profiles . E.g. keep
This takes care, that in addition to running the tests for a current suite, tests from |
kitchen-inspec now supports passing of attributes to the profiles, and inspec_tests can be configured per suite if needed. There are no currently plans to support the "shared examples" model. If there are use cases where you folks feel that's necessary, please log an issue on the chef/inspec project as that would be a feature of InSpec itself, not the kitchen verifier plugin. Thank you! |
Generated from inspec/inspec#338
Depends on inspec/inspec#719
ServerSpec is supporting test reusability and customisability via shared_examples. An example from elasticsearch cookbook:
The text was updated successfully, but these errors were encountered: