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

Use only defined paths if specified (Fixes #216) #217

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/kitchen/verifier/inspec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,9 @@ def resolve_config_inspec_tests
# @return [Array<String>] array of suite directories or remote urls
# @api private
def collect_tests
# get local tests and get run list of profiles
(local_suite_files + resolve_config_inspec_tests).compact.uniq
# get run list of profiles or fall back to local tests
return resolve_config_inspec_tests.uniq if resolve_config_inspec_tests

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like resolve_config_inspec_tests will always return an array and the if condition will always be true, making the next line unreachable

local_suite_files
end

# Returns a configuration Hash that can be passed to a `Inspec::Runner`.
Expand Down