summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2021-07-28 20:00:52 -0700
committerGitHub <noreply@github.com>2021-07-28 20:00:52 -0700
commitf53c9814afc0f98df4738a7e5dd1abe12844d5aa (patch)
tree134b421d13fe998d0f921467f9ce8003e68d09fa
parent38f6e39265a4722c35ef66405bf33c2084e14bb2 (diff)
parent0b9862a232e3b034f75f80a3dcc8a6d999dda0e1 (diff)
downloadchef-f53c9814afc0f98df4738a7e5dd1abe12844d5aa.tar.gz
Merge pull request #11874 from chef/lcg/compliance-chef-node-default
Turn on chef_node_attribute_enabled for compliance phase by default
-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 9196944b92..3a8c8f1ccc 100644
--- a/lib/chef/compliance/default_attributes.rb
+++ b/lib/chef/compliance/default_attributes.rb
@@ -88,7 +88,7 @@ class Chef
# If enabled, a hash representation of the Chef Infra node object will be sent to Chef InSpec in an input
# named `chef_node`.
- "chef_node_attribute_enabled" => false,
+ "chef_node_attribute_enabled" => true,
# Should the built-in compliance phase run. True and false force the behavior. Nil does magic based on if you have
# profiles defined but do not have the audit cookbook enabled.
diff --git a/spec/unit/compliance/runner_spec.rb b/spec/unit/compliance/runner_spec.rb
index e60195b8ec..e41b80f5b1 100644
--- a/spec/unit/compliance/runner_spec.rb
+++ b/spec/unit/compliance/runner_spec.rb
@@ -221,7 +221,7 @@ describe Chef::Compliance::Runner do
inputs = runner.inspec_opts[:inputs]
expect(inputs["tacos"]).to eq("lunch")
- expect(inputs.key?("chef_node")).to eq(false)
+ expect(inputs.key?("chef_node")).to eq(true)
end
it "includes chef_node in inputs with chef_node_attribute_enabled set" do