summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaire McQuin <claire@getchef.com>2014-09-30 08:44:46 -0700
committerClaire McQuin <claire@getchef.com>2014-10-01 14:31:06 -0700
commitea430b7ef437e004afb8826adad36c60588f4ddc (patch)
treeca21794a59962bf56478b3c9269e1a86acdfd149
parent9001bbc2d6ff694ddb31fd8b437b4e28367db839 (diff)
downloadchef-ea430b7ef437e004afb8826adad36c60588f4ddc.tar.gz
Tidy up some comments, whitespace.
-rw-r--r--lib/chef/application.rb2
-rw-r--r--lib/chef/application/client.rb5
-rw-r--r--spec/unit/application/client_spec.rb2
3 files changed, 5 insertions, 4 deletions
diff --git a/lib/chef/application.rb b/lib/chef/application.rb
index 8a0c82d39d..abcc81c290 100644
--- a/lib/chef/application.rb
+++ b/lib/chef/application.rb
@@ -215,7 +215,7 @@ class Chef::Application
else
# Unforked interval runs are disabled, so this runs chef-client
# once and then exits. If TERM signal is received, will "ignore"
- # the signal to finish converge, then exit with exitstatus 3.
+ # the signal to finish converge.
run_with_graceful_exit_option
end
@chef_client = nil
diff --git a/lib/chef/application/client.rb b/lib/chef/application/client.rb
index 098804739e..cc734732bb 100644
--- a/lib/chef/application/client.rb
+++ b/lib/chef/application/client.rb
@@ -258,7 +258,6 @@ class Chef::Application::Client < Chef::Application
Chef::Config.chef_zero.host = config[:chef_zero_host] if config[:chef_zero_host]
Chef::Config.chef_zero.port = config[:chef_zero_port] if config[:chef_zero_port]
-
if Chef::Config[:daemonize]
Chef::Config[:interval] ||= 1800
end
@@ -319,7 +318,7 @@ class Chef::Application::Client < Chef::Application
if !Chef::Config[:client_fork] || Chef::Config[:once]
begin
# run immediately without interval sleep, or splay
- run_chef_client(Chef::Config[:specific_recipes] || [])
+ run_chef_client(Chef::Config[:specific_recipes])
rescue SystemExit
raise
rescue Exception => e
@@ -346,7 +345,7 @@ class Chef::Application::Client < Chef::Application
end
@signal = nil
- run_chef_client(Chef::Config[:specific_recipes] || [])
+ run_chef_client(Chef::Config[:specific_recipes])
Chef::Application.exit!("Exiting", 0) if !Chef::Config[:interval]
rescue SystemExit => e
diff --git a/spec/unit/application/client_spec.rb b/spec/unit/application/client_spec.rb
index a3599e2ac0..1ff82453bf 100644
--- a/spec/unit/application/client_spec.rb
+++ b/spec/unit/application/client_spec.rb
@@ -168,6 +168,8 @@ end
describe Chef::Application::Client, "run_application", :unix_only do
before(:each) do
+ Chef::Config[:specific_recipes] = [] # normally gets set in @app.reconfigure
+
@app = Chef::Application::Client.new
@app.setup_signal_handlers
# Default logger doesn't work correctly when logging from a trap handler.