From 933233295a6c08f2aefe39a0f08f28fa5d3aa3e2 Mon Sep 17 00:00:00 2001 From: tyler-ball Date: Tue, 11 Nov 2014 13:13:48 -0800 Subject: Fixing TODOs --- lib/chef/audit/audit_reporter.rb | 6 ++++-- lib/chef/audit/runner.rb | 1 + lib/chef/client.rb | 1 - 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/chef/audit/audit_reporter.rb b/lib/chef/audit/audit_reporter.rb index 02b9965199..6cbab82acb 100644 --- a/lib/chef/audit/audit_reporter.rb +++ b/lib/chef/audit/audit_reporter.rb @@ -53,9 +53,11 @@ class Chef post_auditing_data end + # If the audit phase failed, its because there was some kind of error in the framework + # that runs tests - normal errors are interpreted as EXAMPLE failures and captured. def audit_phase_failed(error) - # TODO - raise error + # The stacktrace information has already been logged elsewhere + Chef::Log.error("Audit Reporter failed - not sending any auditing information to the server") end def control_group_started(name) diff --git a/lib/chef/audit/runner.rb b/lib/chef/audit/runner.rb index e20c8b3810..4059741359 100644 --- a/lib/chef/audit/runner.rb +++ b/lib/chef/audit/runner.rb @@ -71,6 +71,7 @@ class Chef configuration.backtrace_exclusion_patterns.push(Regexp.new("/Users".gsub("/", File::SEPARATOR))) configuration.backtrace_exclusion_patterns.push(Regexp.new("(eval)")) configuration.color = Chef::Config[:color] + configuration.expose_dsl_globally = false add_formatters disable_should_syntax diff --git a/lib/chef/client.rb b/lib/chef/client.rb index 8cadd43878..16315b8e08 100644 --- a/lib/chef/client.rb +++ b/lib/chef/client.rb @@ -350,7 +350,6 @@ class Chef converge_exception end - # TODO are failed audits going to raise exceptions, or only be handled by the reporters? def run_audits(run_context) audit_exception = nil begin -- cgit v1.2.1