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

Fix platform and suite placeholders being applied incorrectly on reporter option #203

Merged
merged 1 commit into from
Sep 7, 2018
Merged
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ If you want to customize the output file per platform or test suite you can use
```yaml
verifier:
name: inspec
reporter: junit:path/to/results/%{platform}_%{suite}_inspec.xml
reporter:
- cli
- junit:path/to/results/%{platform}_%{suite}_inspec.xml
```

You can also decide to only run specific controls, instead of a full profile. This is done by specifying a list of controls:
Expand Down
2 changes: 1 addition & 1 deletion lib/kitchen/verifier/inspec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def runner_options(transport, state = {}, platform = nil, suite = nil) # rubocop
runner_options["format"] = config[:format] unless config[:format].nil?
runner_options["output"] = config[:output] % { platform: platform, suite: suite } unless config[:output].nil?
runner_options["profiles_path"] = config[:profiles_path] unless config[:profiles_path].nil?
runner_options["reporter"] = config[:reporter] % { platform: platform, suite: suite } unless config[:reporter].nil?
runner_options["reporter"] = config[:reporter].map { |s| s % { platform: platform, suite: suite } } unless config[:reporter].nil?
runner_options[:controls] = config[:controls]

# check to make sure we have a valid version for caching
Expand Down