Skip to content

Commit

Permalink
Fix platform and suite placeholders being applied incorrectly on repo…
Browse files Browse the repository at this point in the history
…rter option (#203)

It is and should be an array, not a string.

Signed-off-by: Wiebe Verweij <wiebe@wiebelt.nl>
  • Loading branch information
wiebe authored and jquick committed Sep 7, 2018
1 parent 2a61c9e commit 09976b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
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

0 comments on commit 09976b4

Please sign in to comment.