From 267a35a5c7f2a3c616d00e2cc98b5e6f83ff6f47 Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Fri, 13 Aug 2021 19:19:32 -0700 Subject: Remove the default json logger from the compliance API This indirectly fixes #11585 and avoids the json logger silently consuming disk space. By reverting back to a single value we also avoid the attributes array merging issues. This might conceivably change behavior to people who were reliant on the additive array-merge behavior, but the compliance profile have been considered experimental. Signed-off-by: Lamont Granquist --- lib/chef/compliance/default_attributes.rb | 2 +- spec/unit/compliance/runner_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/chef/compliance/default_attributes.rb b/lib/chef/compliance/default_attributes.rb index 9839cd740b..24bf72330b 100644 --- a/lib/chef/compliance/default_attributes.rb +++ b/lib/chef/compliance/default_attributes.rb @@ -28,7 +28,7 @@ class Chef # Controls what is done with the resulting report after the Chef InSpec run. # Accepts a single string value or an array of multiple values. # Accepted values: 'chef-server-automate', 'chef-automate', 'json-file', 'audit-enforcer', 'cli' - "reporter" => %w{json-file cli}, + "reporter" => "cli", # Controls if Chef InSpec profiles should be fetched from Chef Automate or Chef Infra Server # in addition to the default fetch locations provided by Chef Inspec. diff --git a/spec/unit/compliance/runner_spec.rb b/spec/unit/compliance/runner_spec.rb index 6040da07b7..c1a0855f78 100644 --- a/spec/unit/compliance/runner_spec.rb +++ b/spec/unit/compliance/runner_spec.rb @@ -278,7 +278,7 @@ describe Chef::Compliance::Runner do inputs = runner.inspec_opts[:inputs] expect(inputs["tacos"]).to eq("lunch") - expect(inputs["chef_node"]["audit"]["reporter"]).to eq(%w{json-file cli}) + expect(inputs["chef_node"]["audit"]["reporter"]).to eq("cli") expect(inputs["chef_node"]["chef_environment"]).to eq("_default") end end -- cgit v1.2.1