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

Default verifier location not ignored when specifying path(s) #216

Open
shoekstra opened this issue Dec 10, 2018 · 1 comment
Open

Default verifier location not ignored when specifying path(s) #216

shoekstra opened this issue Dec 10, 2018 · 1 comment
Labels
Type: Bug Doesn't work as expected.

Comments

@shoekstra
Copy link

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

shoekstra added a commit to shoekstra/kitchen-inspec that referenced this issue Dec 10, 2018
Signed-off-by: Stephen Hoekstra <shoekstra@schubergphilis.com>
@shoekstra
Copy link
Author

Any thoughts on this one @chris-rock @adamleff?

@zenspider zenspider added the Type: Bug Doesn't work as expected. label Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Doesn't work as expected.
Projects
None yet
Development

No branches or pull requests

2 participants