diff options
author | Marc Chamberland <mchamberland@pbsc.com> | 2019-04-06 20:16:04 -0400 |
---|---|---|
committer | Marc Chamberland <mchamberland@pbsc.com> | 2019-04-19 19:02:35 -0400 |
commit | fd0508d32a3cd683b827c5d25f2bd07f0311243b (patch) | |
tree | 455ffe250d8e3f46ac31e369b1c4a553b12a18b1 | |
parent | 33d1f9e3ad1013387a3b3a53d6969c905942b692 (diff) | |
download | chef-fd0508d32a3cd683b827c5d25f2bd07f0311243b.tar.gz |
fixing tests
Signed-off-by: Marc Chamberland <mchamberland@pbsc.com>
-rw-r--r-- | lib/chef/application/client.rb | 4 | ||||
-rw-r--r-- | spec/unit/application/client_spec.rb | 4 | ||||
-rw-r--r-- | spec/unit/application/solo_spec.rb | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/chef/application/client.rb b/lib/chef/application/client.rb index 3758abe378..ee3e0f7f04 100644 --- a/lib/chef/application/client.rb +++ b/lib/chef/application/client.rb @@ -441,7 +441,7 @@ class Chef::Application::Client < Chef::Application def interval_run_chef_client if Chef::Config[:daemonize] - Chef::Daemon.daemonize(Chef::DIST::CLIENT) + Chef::Daemon.daemonize(Chef::Dist::CLIENT) # Start first daemonized run after configured number of seconds if Chef::Config[:daemonize].is_a?(Integer) @@ -504,7 +504,7 @@ class Chef::Application::Client < Chef::Application end def unforked_interval_error_message - "Unforked #{Chef::Dist::CLIENT} interval runs are disabled in Chef 12." + + "Unforked #{Chef::Dist::CLIENT} interval runs are disabled in #{Chef::Dist::PRODUCT} 12." + "\nConfiguration settings:" + ("\n interval = #{Chef::Config[:interval]} seconds" if Chef::Config[:interval]).to_s + "\nEnable #{Chef::Dist::CLIENT} interval runs by setting `:client_fork = true` in your config file or adding `--fork` to your command line options." diff --git a/spec/unit/application/client_spec.rb b/spec/unit/application/client_spec.rb index 6af3a31cd1..a24f74b4a0 100644 --- a/spec/unit/application/client_spec.rb +++ b/spec/unit/application/client_spec.rb @@ -326,10 +326,10 @@ describe Chef::Application::Client, "reconfigure" do Chef::Config[:interval] = 600 allow(ChefConfig).to receive(:windows?).and_return(false) expect(Chef::Application).to receive(:fatal!).with( - "Unforked chef-client interval runs are disabled in Chef 12. + "Unforked #{Chef::Dist::CLIENT} interval runs are disabled in #{Chef::Dist::PRODUCT} 12. Configuration settings: interval = 600 seconds -Enable chef-client interval runs by setting `:client_fork = true` in your config file or adding `--fork` to your command line options." +Enable #{Chef::Dist::CLIENT} interval runs by setting `:client_fork = true` in your config file or adding `--fork` to your command line options." ) app.reconfigure end diff --git a/spec/unit/application/solo_spec.rb b/spec/unit/application/solo_spec.rb index 939300b7e4..4d9d1371f7 100644 --- a/spec/unit/application/solo_spec.rb +++ b/spec/unit/application/solo_spec.rb @@ -64,10 +64,10 @@ describe Chef::Application::Solo do it "should terminate with message" do expect(Chef::Application).to receive(:fatal!).with( - "Unforked chef-client interval runs are disabled in Chef 12. + "Unforked #{Chef::Dist::CLIENT} interval runs are disabled in #{Chef::Dist::PRODUCT} 12. Configuration settings: interval = 600 seconds -Enable chef-client interval runs by setting `:client_fork = true` in your config file or adding `--fork` to your command line options." +Enable #{Chef::Dist::CLIENT} interval runs by setting `:client_fork = true` in your config file or adding `--fork` to your command line options." ) app.reconfigure end |