summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2021-08-23 12:18:15 -0700
committerGitHub <noreply@github.com>2021-08-23 12:18:15 -0700
commit71b6f71067c25f74018f7aaa183af4108e366a58 (patch)
treecf1972bacf4dc53bc6f0586e6a09f0c20518669b
parentcbca9d42c4170d7262c5565f415d43a177ef8c24 (diff)
parent643b657f000dc22878a16a3ab2f2311afe1d7fd5 (diff)
downloadchef-71b6f71067c25f74018f7aaa183af4108e366a58.tar.gz
Merge pull request #11924 from chef/lcg/compliance-remove-json-logger
Remove the default json logger from the compliance API
-rw-r--r--lib/chef/compliance/default_attributes.rb2
-rw-r--r--spec/integration/compliance/compliance_spec.rb1
-rw-r--r--spec/unit/compliance/runner_spec.rb2
3 files changed, 3 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/integration/compliance/compliance_spec.rb b/spec/integration/compliance/compliance_spec.rb
index 70d048c7fc..553e947ee3 100644
--- a/spec/integration/compliance/compliance_spec.rb
+++ b/spec/integration/compliance/compliance_spec.rb
@@ -47,6 +47,7 @@ describe "chef-client with compliance phase" do
{
"audit": {
"compliance_phase": true,
+ "reporter": "json-file",
"json_file": {
"location": "#{report_file}"
},
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