-
Notifications
You must be signed in to change notification settings - Fork 59
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
support test suite helpers #12
Conversation
This change builds on inspec/kitchen-inspec#12. All test directories should be on the `$LOAD_PATH` when `Inspec::Runner` executes the test suites with `RSpec::Core::Runner`. This will allow things like `require 'spec_helper'` to work as expected.
This change builds on inspec/kitchen-inspec#12. All test directories should be on the `$LOAD_PATH` when `Inspec::Runner` executes the test suites with `RSpec::Core::Runner`. This will allow things like `require 'spec_helper'` to work as expected.
👍 |
I talked with @arlimus's in depth about this feature. We are going to hold off on merging anything for now as they have some plans to address this soon. There will be an upcoming RFC that lays out the the various options. |
Test Kitchen's default verifier, Busser, has support for loading helper files which include things like: * spec_helper * InSpec custom resources * RSpec shared examples * RSpec shared contexts * RSpec custom matchers These helper files are meant to be shared amongst all test suites in a project structure like: ``` test/integration/ ├── helpers │ └── <VERIFIER> │ ├── spec_helper.rb │ └── support │ └── some_file.rb ├── suite1 │ └── <VERIFIER> │ └── some_spec.rb └── suite2 └── <VERIFIER> └── some_spec.rb ``` Some real world examples can be seen at: https://github.com/chef-cookbooks/jenkins/tree/master/test/integration https://github.com/chef-cookbooks/languages/tree/master/test/integration https://github.com/chef-cookbooks/omnibus/tree/master/test/integration This change ensures `Kitchen::Verifier::Inspec` fully supports these helper files!
6858b09
to
edc6d9f
Compare
Thanks @schisamo that helps us to ease the Serverspec migration |
Unlikely the latest version dropped support for helper files in inspec: https://github.com/chef/kitchen-inspec/blob/master/lib/kitchen/verifier/inspec.rb |
Test Kitchen's default verifier, Busser, has support for loading helper files which include things like:
These helper files are meant to be shared amongst all test suites in a project structure like:
Some real world examples can be seen at:
https://github.com/chef-cookbooks/jenkins/tree/master/test/integration
https://github.com/chef-cookbooks/languages/tree/master/test/integration
https://github.com/chef-cookbooks/omnibus/tree/master/test/integration
This change ensures
Kitchen::Verifier::Inspec
fully supports these helper files!/cc @chef/compliance @chef/engineering-services