summaryrefslogtreecommitdiff
path: root/lib/chef/audit
diff options
context:
space:
mode:
authortyler-ball <tyleraball@gmail.com>2014-11-10 15:08:25 -0800
committertyler-ball <tyleraball@gmail.com>2014-12-17 18:50:10 -0800
commitc6732b92c8b501800c9009dd2f4d04042f9bca9c (patch)
tree8a591de65214c83b7c41dbdd0cdcfc3697d54be7 /lib/chef/audit
parentd20d3aca4e6cc947322c347ba6b7a0f6260576b6 (diff)
downloadchef-c6732b92c8b501800c9009dd2f4d04042f9bca9c.tar.gz
Sending to correct server URL
Diffstat (limited to 'lib/chef/audit')
-rw-r--r--lib/chef/audit/audit_reporter.rb12
-rw-r--r--lib/chef/audit/runner.rb1
2 files changed, 7 insertions, 6 deletions
diff --git a/lib/chef/audit/audit_reporter.rb b/lib/chef/audit/audit_reporter.rb
index a671ce2221..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)
@@ -83,10 +85,8 @@ class Chef
def post_auditing_data
if auditing_enabled?
- node_name = audit_data.node_name
- run_id = audit_data.run_id
- audit_history_url = "audits/nodes/#{node_name}/runs/#{run_id}"
- Chef::Log.info("Sending audit report (run-id: #{run_id})")
+ audit_history_url = "controls"
+ Chef::Log.info("Sending audit report (run-id: #{audit_data.run_id})")
run_data = audit_data.to_hash
Chef::Log.debug run_data.inspect
compressed_data = encode_gzip(Chef::JSONCompat.to_json(run_data))
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