summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThom May <thom@may.lt>2015-06-09 10:30:24 +0100
committerThom May <thom@may.lt>2015-06-09 10:30:24 +0100
commit1d42bcc2eaa8d693a534ba0810d3722587a59c97 (patch)
tree64e3dbb3e412135503960ba95766596913446e94
parent59da09f64b72dbd712c890f999322493a4bc9ec4 (diff)
parent971d5b7830f3cf70d60aaff07190c21dfd5873b9 (diff)
downloadchef-1d42bcc2eaa8d693a534ba0810d3722587a59c97.tar.gz
Merge pull request #3299 from juliandunn/remove-audit-mode-experimental-warning
Remove experimental warning on audit mode.
-rw-r--r--lib/chef/application/client.rb21
-rw-r--r--spec/unit/application/client_spec.rb5
2 files changed, 2 insertions, 24 deletions
diff --git a/lib/chef/application/client.rb b/lib/chef/application/client.rb
index 551e26e303..409680b553 100644
--- a/lib/chef/application/client.rb
+++ b/lib/chef/application/client.rb
@@ -326,12 +326,6 @@ class Chef::Application::Client < Chef::Application
unless expected_modes.include?(mode)
Chef::Application.fatal!(unrecognized_audit_mode(mode))
end
-
- unless mode == :disabled
- # This should be removed when audit-mode is enabled by default/no longer
- # an experimental feature.
- Chef::Log.warn(audit_mode_experimental_message)
- end
end
end
@@ -454,7 +448,7 @@ class Chef::Application::Client < Chef::Application
"\nEnable chef-client interval runs by setting `:client_fork = true` in your config file or adding `--fork` to your command line options."
end
- def audit_mode_settings_explaination
+ def audit_mode_settings_explanation
"\n* To enable audit mode after converge, use command line option `--audit-mode enabled` or set `:audit_mode = :enabled` in your config file." +
"\n* To disable audit mode, use command line option `--audit-mode disabled` or set `:audit_mode = :disabled` in your config file." +
"\n* To only run audit mode, use command line option `--audit-mode audit-only` or set `:audit_mode = :audit_only` in your config file." +
@@ -462,18 +456,7 @@ class Chef::Application::Client < Chef::Application
end
def unrecognized_audit_mode(mode)
- "Unrecognized setting #{mode} for audit mode." + audit_mode_settings_explaination
- end
-
- def audit_mode_experimental_message
- msg = if Chef::Config[:audit_mode] == :audit_only
- "Chef-client has been configured to skip converge and only audit."
- else
- "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
- return msg
+ "Unrecognized setting #{mode} for audit mode." + audit_mode_settings_explanation
end
def fetch_recipe_tarball(url, path)
diff --git a/spec/unit/application/client_spec.rb b/spec/unit/application/client_spec.rb
index f358aa1c77..64a6bcc9d2 100644
--- a/spec/unit/application/client_spec.rb
+++ b/spec/unit/application/client_spec.rb
@@ -165,11 +165,6 @@ Enable chef-client interval runs by setting `:client_fork = true` in your config
before do
allow(Chef::Log).to receive(:warn)
end
-
- it "emits a warning that audit mode is an experimental feature" do
- expect(Chef::Log).to receive(:warn).with(/Audit mode is an experimental feature/)
- app.reconfigure
- end
end
shared_examples "unrecognized setting" do