summaryrefslogtreecommitdiff
path: root/lib/chef/audit
diff options
context:
space:
mode:
authorClaire McQuin <claire@getchef.com>2014-12-16 13:03:53 -0800
committertyler-ball <tyleraball@gmail.com>2014-12-17 18:52:25 -0800
commit19f7b0f1668e5801f44570f52285f8a1bde516c0 (patch)
treed53a3cf4d9ae3eeb923054ab1f6799887e8de796 /lib/chef/audit
parent5531cabf5640607874fd24c5e9c6006d848ec69b (diff)
downloadchef-19f7b0f1668e5801f44570f52285f8a1bde516c0.tar.gz
Unit tests for audit-mode in chef-solo.
* Audits are disabled by default. * Also, updated spec file to use RSpec :let.
Diffstat (limited to 'lib/chef/audit')
-rw-r--r--lib/chef/audit/audit_reporter.rb2
-rw-r--r--lib/chef/audit/runner.rb9
2 files changed, 2 insertions, 9 deletions
diff --git a/lib/chef/audit/audit_reporter.rb b/lib/chef/audit/audit_reporter.rb
index 407c2deeb0..596b06b285 100644
--- a/lib/chef/audit/audit_reporter.rb
+++ b/lib/chef/audit/audit_reporter.rb
@@ -117,8 +117,6 @@ class Chef
run_data = audit_data.to_hash
if error
- # TODO: Rather than a single string we might want to format the exception here similar to
- # lib/chef/resource_reporter.rb#83
run_data[:error] = "#{error.class.to_s}: #{error.message}\n#{error.backtrace.join("\n")}"
end
diff --git a/lib/chef/audit/runner.rb b/lib/chef/audit/runner.rb
index 1450ef7f61..4017593c55 100644
--- a/lib/chef/audit/runner.rb
+++ b/lib/chef/audit/runner.rb
@@ -108,8 +108,6 @@ class Chef
# the output stream to be changed for a formatter once the formatter has
# been added.
def set_streams
- # TODO: Do some testing to ensure these will output/output properly to
- # a file.
RSpec.configuration.output_stream = Chef::Config[:log_location]
RSpec.configuration.error_stream = Chef::Config[:log_location]
end
@@ -135,12 +133,9 @@ class Chef
end
end
- # Set up the backend for Specinfra/Serverspec.
+ # Set up the backend for Specinfra/Serverspec. :exec is the local system.
def configure_specinfra
- # TODO: We may need to be clever and adjust this based on operating
- # system, or make it configurable. E.g., there is a PowerShell backend,
- # as well as an SSH backend.
- Specinfra.configuration.backend = :exec if Specinfra.configuration.backend != :exec
+ Specinfra.configuration.backend = :exec
end
# Iterates through the controls registered to this run_context, builds an