diff options
author | Lamont Granquist <lamont@opscode.com> | 2013-06-19 14:40:47 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@opscode.com> | 2013-06-19 14:40:47 -0700 |
commit | e23232bf8c9fad3c04dc03e91a7d77157dffd603 (patch) | |
tree | 3e4acb36e37852c356cdd076d18aaac0ccedc59a /spec | |
parent | 2a3d8a762f5d0b3fce36dd44106c0ac04caa5eba (diff) | |
download | chef-e23232bf8c9fad3c04dc03e91a7d77157dffd603.tar.gz |
aix's error message for EPERM is like solaris's
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/daemon_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/unit/daemon_spec.rb b/spec/unit/daemon_spec.rb index 5a0bbd6a47..5c0d828354 100644 --- a/spec/unit/daemon_spec.rb +++ b/spec/unit/daemon_spec.rb @@ -154,30 +154,30 @@ describe Chef::Daemon do FileUtils.should_receive(:rm).with("/var/run/chef/chef-client.pid") Chef::Daemon.remove_pid_file end - + end describe "when the pid file exists and the process is forked" do - + before do File.stub!(:exists?).with("/var/run/chef/chef-client.pid").and_return(true) Chef::Daemon.stub!(:forked?) { true } end - + it "should not remove the file" do FileUtils.should_not_receive(:rm) Chef::Daemon.remove_pid_file end - + end - + describe "when the pid file exists and the process is not forked" do before do File.stub!(:exists?).with("/var/run/chef/chef-client.pid").and_return(true) Chef::Daemon.stub!(:forked?) { false } end - + it "should remove the file" do FileUtils.should_receive(:rm) Chef::Daemon.remove_pid_file @@ -295,7 +295,7 @@ describe Chef::Daemon do it "should log an appropriate error message and fail miserably" do Process.stub!(:initgroups).and_raise(Errno::EPERM) error = "Operation not permitted" - if RUBY_PLATFORM.match("solaris2") + if RUBY_PLATFORM.match("solaris2") || RUBY_PLATFORM.match("aix") error = "Not owner" end Chef::Application.should_receive(:fatal!).with("Permission denied when trying to change 999:999 to 501:20. #{error}") |