kitchen-inspec
kitchen-inspec copied to clipboard
Default verifier location not ignored when specifying path(s)
Hi!
I recently discovered when specifying paths to tests using inspec_tests
that the default expected path is still included in the tests and not sure if this is or should be desired.
My .kitchen.yml
file:
- name: default
run_list:
- recipe[mycookbook]
verifier:
inspec_tests:
- test/integration/default/default_test.rb
- name: selinux
lifecycle:
post_create:
- remote: sudo setenforce 1
run_list:
- recipe[mycookbook]
verifier:
inspec_tests:
- test/integration/default/selinux_test.rb
- test/integration/default/default_test.rb
The "default" suite loads test/integration/default
and test/integration/default/default_test.rb
, which also loads selinux_test.rb
and fails while the "selinux" suite passes successfully (as test/integration/selinux
doesn't exist).
My test
directory structure has been in the form of test/integration/RECIPE_NAME/
and I hadn't come across this problem until now.
Option 1 would be to move test/integration/default/selinux_test.rb
to test/integration/selinux/default_test.rb
, but doesn't feel right.
Option 2 would be PR to disregard default path when a path is specified.
What are the thoughts on this?
Stephen
Any thoughts on this one @chris-rock @adamleff?