mirror of
https://github.com/inspec/inspec
synced 2024-11-23 13:13:22 +00:00
Suppress logs for json-automate reporter (#3324)
Signed-off-by: Jared Quick <jquick@chef.io>
This commit is contained in:
parent
0767ffc6f5
commit
9f3e1c33a8
2 changed files with 6 additions and 1 deletions
|
@ -240,7 +240,7 @@ module Inspec
|
||||||
|
|
||||||
def suppress_log_output?(opts)
|
def suppress_log_output?(opts)
|
||||||
return false if opts['reporter'].nil?
|
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?
|
unless match.empty?
|
||||||
match.each do |m|
|
match.each do |m|
|
||||||
# check to see if we are outputting to stdout
|
# check to see if we are outputting to stdout
|
||||||
|
|
|
@ -176,6 +176,11 @@ EOF
|
||||||
cli.send(:suppress_log_output?, opts).must_equal true
|
cli.send(:suppress_log_output?, opts).must_equal true
|
||||||
end
|
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
|
it 'suppresses junit' do
|
||||||
opts = { 'reporter' => { 'junit' => { 'stdout' => true }}}
|
opts = { 'reporter' => { 'junit' => { 'stdout' => true }}}
|
||||||
cli.send(:suppress_log_output?, opts).must_equal true
|
cli.send(:suppress_log_output?, opts).must_equal true
|
||||||
|
|
Loading…
Reference in a new issue