summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/chef/data_collector/run_end_message.rb2
-rw-r--r--spec/unit/data_collector_spec.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/data_collector/run_end_message.rb b/lib/chef/data_collector/run_end_message.rb
index 5c23224678..762058bfdb 100644
--- a/lib/chef/data_collector/run_end_message.rb
+++ b/lib/chef/data_collector/run_end_message.rb
@@ -57,7 +57,7 @@ class Chef
"resources" => all_action_records(action_collection),
"run_id" => run_status&.run_id,
"run_list" => node&.run_list&.for_json || [],
- "expanded_cookbooks" => node&.fetch("cookbooks", {}) || {},
+ "cookbooks" => ( node && node["cookbooks"] ) || {},
"policy_name" => node&.policy_name,
"policy_group" => node&.policy_group,
"start_time" => run_status.start_time.utc.iso8601,
diff --git a/spec/unit/data_collector_spec.rb b/spec/unit/data_collector_spec.rb
index 28d677aa6a..5eeeec1498 100644
--- a/spec/unit/data_collector_spec.rb
+++ b/spec/unit/data_collector_spec.rb
@@ -46,7 +46,7 @@ describe Chef::DataCollector do
let(:run_list) { node.run_list }
- let(:expanded_cookbooks) { node.fetch("cookbooks", {}) }
+ let(:cookbooks) { node.fetch("cookbooks", {}) }
let(:run_id) { run_status.run_id }
@@ -214,7 +214,7 @@ describe Chef::DataCollector do
end
it "has a cookbooks" do
- expect_converge_message("expanded_cookbooks" => expanded_cookbooks)
+ expect_converge_message("cookbooks" => cookbooks)
send_run_failed_or_completed_event
end