Suppress logs for json-automate reporter (#3324)

Signed-off-by: Jared Quick <jquick@chef.io>
This commit is contained in:
Jared Quick 2018-08-23 13:43:48 -04:00 committed by GitHub
parent 0767ffc6f5
commit 9f3e1c33a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -240,7 +240,7 @@ module Inspec
def suppress_log_output?(opts)
return false if opts['reporter'].nil?
match = %w{json json-min json-rspec junit html yaml documentation progress} & opts['reporter'].keys
match = %w{json json-min json-rspec json-automate junit html yaml documentation progress} & opts['reporter'].keys
unless match.empty?
match.each do |m|
# check to see if we are outputting to stdout

View file

@ -176,6 +176,11 @@ EOF
cli.send(:suppress_log_output?, opts).must_equal true
end
it 'suppresses json-automate' do
opts = { 'reporter' => { 'json-automate' => { 'stdout' => true }}}
cli.send(:suppress_log_output?, opts).must_equal true
end
it 'suppresses junit' do
opts = { 'reporter' => { 'junit' => { 'stdout' => true }}}
cli.send(:suppress_log_output?, opts).must_equal true