summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/chef/audit/audit_reporter.rb2
-rw-r--r--lib/chef/dsl/audit.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/audit/audit_reporter.rb b/lib/chef/audit/audit_reporter.rb
index c2c3f426f1..d022ac0c47 100644
--- a/lib/chef/audit/audit_reporter.rb
+++ b/lib/chef/audit/audit_reporter.rb
@@ -75,7 +75,7 @@ class Chef
if ordered_control_groups.has_key?(name)
raise Chef::Exceptions::AuditControlGroupDuplicate.new(name)
end
- metadata = run_context.controls[name].metadata
+ metadata = run_context.audits[name].metadata
ordered_control_groups.store(name, ControlGroupData.new(name, metadata))
end
diff --git a/lib/chef/dsl/audit.rb b/lib/chef/dsl/audit.rb
index 662e1e75c9..022bbcce01 100644
--- a/lib/chef/dsl/audit.rb
+++ b/lib/chef/dsl/audit.rb
@@ -30,7 +30,7 @@ class Chef
name = args[0]
if name.nil? || name.empty?
raise Chef::Exceptions::AuditNameMissing
- elsif run_context.controls.has_key?(name)
+ elsif run_context.audits.has_key?(name)
raise Chef::Exceptions::AuditControlGroupDuplicate.new(name)
end