summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2021-08-13 19:19:32 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2021-08-17 17:07:40 -0700
commit267a35a5c7f2a3c616d00e2cc98b5e6f83ff6f47 (patch)
tree9dbb749b9dbfff4c72e59335b11efef49c5fcacd
parent3e2895b5991a4c3d43c96c0f7b46c1794daa9c80 (diff)
downloadchef-lcg/compliance-remove-json-logger.tar.gz
Remove the default json logger from the compliance APIlcg/compliance-remove-json-logger
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 <lamont@scriptkiddie.org>
-rw-r--r--lib/chef/compliance/default_attributes.rb2
-rw-r--r--spec/unit/compliance/runner_spec.rb2
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