summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortyler-ball <tyleraball@gmail.com>2014-11-11 13:13:48 -0800
committertyler-ball <tyleraball@gmail.com>2014-11-11 13:13:48 -0800
commit933233295a6c08f2aefe39a0f08f28fa5d3aa3e2 (patch)
treec58c0ef203b31061ce8c7b4b5e40fdee8da6ab2a
parent964668d186f781d8b7de2dc1d083956e6cb78a34 (diff)
downloadchef-tball/audit-mode-integration.tar.gz
-rw-r--r--lib/chef/audit/audit_reporter.rb6
-rw-r--r--lib/chef/audit/runner.rb1
-rw-r--r--lib/chef/client.rb1
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