summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJeff Johnson <jeff@jeffs-tech.com>2021-03-09 11:26:56 -0800
committerJeff Johnson <jeff@jeffs-tech.com>2021-03-09 11:26:56 -0800
commit9fc122d4ee60fa0f3c16f3b72169634c9aa5cbef (patch)
tree4306fc59349fa7014ba122a7a7bfc2ceb87d6025 /spec
parentd17e4f2ffbb9d152d8f4d30c2abd2d1356dcac56 (diff)
downloadchef-9fc122d4ee60fa0f3c16f3b72169634c9aa5cbef.tar.gz
use full path for launchctl calls
Signed-off-by: Jeff Johnson <jeff@jeffs-tech.com>
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/provider/service/macosx_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/unit/provider/service/macosx_spec.rb b/spec/unit/provider/service/macosx_spec.rb
index adf1192165..eafc857cf1 100644
--- a/spec/unit/provider/service/macosx_spec.rb
+++ b/spec/unit/provider/service/macosx_spec.rb
@@ -78,7 +78,7 @@ describe Chef::Provider::Service::Macosx do
@getpwuid = double("Etc::Passwd", { name: "mikedodge04" })
allow(Etc).to receive(:getpwuid).and_return(@getpwuid)
allow(node).to receive(:[]).with("platform_version").and_return("10.11.1")
- cmd = "launchctl list #{service_label}"
+ cmd = "/bin/launchctl list #{service_label}"
allow(provider).to receive(:shell_out)
.with(/(#{su_cmd} '#{cmd}'|#{cmd})/, default_env: false)
.and_return(double("Status",
@@ -265,7 +265,7 @@ describe Chef::Provider::Service::Macosx do
end
it "starts service via launchctl if service found" do
- cmd = "launchctl load -w " + session + plist
+ cmd = "/bin/launchctl load -w " + session + plist
expect(provider).to receive(:shell_out)
.with(/(#{su_cmd} .#{cmd}.|#{cmd})/, default_env: false)
.and_return(0)
@@ -297,7 +297,7 @@ describe Chef::Provider::Service::Macosx do
end
it "stops the service via launchctl if service found" do
- cmd = "launchctl unload -w " + plist
+ cmd = "/bin/launchctl unload -w " + plist
expect(provider).to receive(:shell_out)
.with(/(#{su_cmd} .#{cmd}.|#{cmd})/, default_env: false)
.and_return(0)