diff options
author | Julian C. Dunn <jdunn@aquezada.com> | 2015-03-16 17:27:19 -0500 |
---|---|---|
committer | Julian C. Dunn <jdunn@aquezada.com> | 2015-03-16 17:27:19 -0500 |
commit | cade6e3440badf2f43b3032b802a7b60c7b087db (patch) | |
tree | a1c956b9700546eb85389a815966b334cbbe0e10 | |
parent | 4f1899d0a823c8367faa829784138d2976e6fa9a (diff) | |
parent | 4db544319500bf7f0b74687cc1d2c0fd2c55766b (diff) | |
download | chef-cade6e3440badf2f43b3032b802a7b60c7b087db.tar.gz |
Merge pull request #3064 from juliandunn/fix-audit-terminology
make audit terminology consistent
-rw-r--r-- | lib/chef/application/client.rb | 4 | ||||
-rw-r--r-- | lib/chef/audit/audit_reporter.rb | 2 | ||||
-rw-r--r-- | lib/chef/client.rb | 2 | ||||
-rw-r--r-- | lib/chef/exceptions.rb | 6 | ||||
-rw-r--r-- | lib/chef/formatters/doc.rb | 4 | ||||
-rw-r--r-- | lib/chef/run_context.rb | 2 | ||||
-rw-r--r-- | spec/unit/audit/audit_reporter_spec.rb | 2 |
7 files changed, 11 insertions, 11 deletions
diff --git a/lib/chef/application/client.rb b/lib/chef/application/client.rb index d5dc936f83..03fd07e9f0 100644 --- a/lib/chef/application/client.rb +++ b/lib/chef/application/client.rb @@ -451,9 +451,9 @@ class Chef::Application::Client < Chef::Application def audit_mode_experimental_message msg = if Chef::Config[:audit_mode] == :audit_only - "Chef-client has been configured to skip converge and run only audits." + "Chef-client has been configured to skip converge and only audit." else - "Chef-client has been configured to run audits after it converges." + "Chef-client has been configured to audit after it converges." end msg += " Audit mode is an experimental feature currently under development. API changes may occur. Use at your own risk." msg += audit_mode_settings_explaination diff --git a/lib/chef/audit/audit_reporter.rb b/lib/chef/audit/audit_reporter.rb index a5dd9a6c48..a4f84ed7eb 100644 --- a/lib/chef/audit/audit_reporter.rb +++ b/lib/chef/audit/audit_reporter.rb @@ -105,7 +105,7 @@ class Chef end unless run_status - Chef::Log.debug("Run failed before audits were initialized, not sending audit report to server") + Chef::Log.debug("Run failed before audit mode was initialized, not sending audit report to server") return end diff --git a/lib/chef/client.rb b/lib/chef/client.rb index 3b4f8d4683..7fd7bd9e3f 100644 --- a/lib/chef/client.rb +++ b/lib/chef/client.rb @@ -450,7 +450,7 @@ class Chef if Chef::Config[:why_run] == true # why_run should probably be renamed to why_converge - Chef::Log.debug("Not running audits in 'why_run' mode - this mode is used to see potential converge changes") + Chef::Log.debug("Not running controls in 'why_run' mode - this mode is used to see potential converge changes") elsif Chef::Config[:audit_mode] != :disabled audit_error = run_audits(run_context) end diff --git a/lib/chef/exceptions.rb b/lib/chef/exceptions.rb index ecd84c5ba5..22f090789f 100644 --- a/lib/chef/exceptions.rb +++ b/lib/chef/exceptions.rb @@ -399,18 +399,18 @@ class Chef class AuditControlGroupDuplicate < RuntimeError def initialize(name) - super "Audit control group with name '#{name}' has already been defined" + super "Control group with name '#{name}' has already been defined" end end class AuditNameMissing < RuntimeError; end class NoAuditsProvided < RuntimeError def initialize - super "You must provide a block with audits" + super "You must provide a block with controls" end end class AuditsFailed < RuntimeError def initialize(num_failed, num_total) - super "Audit phase found failures - #{num_failed}/#{num_total} audits failed" + super "Audit phase found failures - #{num_failed}/#{num_total} controls failed" end end diff --git a/lib/chef/formatters/doc.rb b/lib/chef/formatters/doc.rb index 489888db8f..7144d00b5d 100644 --- a/lib/chef/formatters/doc.rb +++ b/lib/chef/formatters/doc.rb @@ -47,7 +47,7 @@ class Chef else puts_line "Chef Client finished, #{@updated_resources}/#{total_resources} resources updated in #{elapsed_time} seconds" if total_audits > 0 - puts_line " #{successful_audits}/#{total_audits} Audits succeeded" + puts_line " #{successful_audits}/#{total_audits} controls succeeded" end end end @@ -59,7 +59,7 @@ class Chef else puts_line "Chef Client failed. #{@updated_resources} resources updated in #{elapsed_time} seconds" if total_audits > 0 - puts_line " #{successful_audits} Audits succeeded" + puts_line " #{successful_audits} controls succeeded" end end end diff --git a/lib/chef/run_context.rb b/lib/chef/run_context.rb index fc54506407..4f0215bfd4 100644 --- a/lib/chef/run_context.rb +++ b/lib/chef/run_context.rb @@ -50,7 +50,7 @@ class Chef # recipes, which is triggered by #load. (See also: CookbookCompiler) attr_accessor :resource_collection - # The list of audits (control groups) to execute during the audit phase + # The list of control groups to execute during the audit phase attr_accessor :audits # A Hash containing the immediate notifications triggered by resources diff --git a/spec/unit/audit/audit_reporter_spec.rb b/spec/unit/audit/audit_reporter_spec.rb index 84d7ea82f0..4bf889510a 100644 --- a/spec/unit/audit/audit_reporter_spec.rb +++ b/spec/unit/audit/audit_reporter_spec.rb @@ -203,7 +203,7 @@ describe Chef::Audit::AuditReporter do it "doesn't send reports" do expect(reporter).to receive(:auditing_enabled?).and_return(true) expect(reporter).to receive(:run_status).and_return(nil) - expect(Chef::Log).to receive(:debug).with("Run failed before audits were initialized, not sending audit report to server") + expect(Chef::Log).to receive(:debug).with("Run failed before audit mode was initialized, not sending audit report to server") reporter.run_completed(node) end |