diff --git a/README.md b/README.md index 5a8b475..b686abd 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/lib/kitchen/verifier/inspec.rb b/lib/kitchen/verifier/inspec.rb index bf1071e..6f0187a 100644 --- a/lib/kitchen/verifier/inspec.rb +++ b/lib/kitchen/verifier/inspec.rb @@ -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