summaryrefslogtreecommitdiff
path: root/spec/unit/provider
diff options
context:
space:
mode:
authormarkgibbons <mark.gibbons@nordstrom.com>2017-02-06 15:05:46 -0800
committermarkgibbons <mark.gibbons@nordstrom.com>2017-02-17 11:42:33 -0800
commit2c63d86ffc1f1334216d401af364d5acffdf2c09 (patch)
tree4e48490b5b2404185a0810bf4fcd7a09594aeb3c /spec/unit/provider
parent87e4d14ccb06053cf2837f5df1f629ae37f6e956 (diff)
downloadchef-2c63d86ffc1f1334216d401af364d5acffdf2c09.tar.gz
smf_recursive_dependencies: Separate the svcadm options passed to shell_out.
Signed-off-by: markgibbons <mark.gibbons@nordstrom.com>
Diffstat (limited to 'spec/unit/provider')
-rw-r--r--spec/unit/provider/service/solaris_smf_service_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/unit/provider/service/solaris_smf_service_spec.rb b/spec/unit/provider/service/solaris_smf_service_spec.rb
index aefdfb6e32..584176b944 100644
--- a/spec/unit/provider/service/solaris_smf_service_spec.rb
+++ b/spec/unit/provider/service/solaris_smf_service_spec.rb
@@ -207,7 +207,7 @@ describe Chef::Provider::Service::Solaris do
@new_resource.options("-r")
expect(@provider).to receive(:shell_out!).with("/bin/svcs", "-l", "chef", { :returns => [0, 1] }).and_return(@enabled_svc_status)
expect(@provider).not_to receive(:shell_out!).with("/usr/sbin/svcadm", "clear", @current_resource.service_name)
- expect(@provider).to receive(:shell_out!).with("/usr/sbin/svcadm", "enable", "-s -r", @current_resource.service_name).and_return(@success)
+ expect(@provider).to receive(:shell_out!).with("/usr/sbin/svcadm", "enable", "-s", "-r", @current_resource.service_name).and_return(@success)
@provider.load_current_resource
expect(@provider.enable_service).to be_truthy
expect(@current_resource.enabled).to be_truthy
@@ -217,7 +217,7 @@ describe Chef::Provider::Service::Solaris do
@new_resource.options(["-r", "-t"])
expect(@provider).to receive(:shell_out!).with("/bin/svcs", "-l", "chef", { :returns => [0, 1] }).and_return(@enabled_svc_status)
expect(@provider).not_to receive(:shell_out!).with("/usr/sbin/svcadm", "clear", @current_resource.service_name)
- expect(@provider).to receive(:shell_out!).with("/usr/sbin/svcadm", "enable", "-s -r -t", @current_resource.service_name).and_return(@success)
+ expect(@provider).to receive(:shell_out!).with("/usr/sbin/svcadm", "enable", "-s", "-r", "-t", @current_resource.service_name).and_return(@success)
@provider.load_current_resource
expect(@provider.enable_service).to be_truthy
expect(@current_resource.enabled).to be_truthy
@@ -249,7 +249,7 @@ describe Chef::Provider::Service::Solaris do
it "should call svcadm disable chef with options" do
@new_resource.options("-t")
expect(@provider).to receive(:shell_out!).with("/bin/svcs", "-l", "chef", { :returns => [0, 1] }).and_return(@disabled_svc_status)
- expect(@provider).to receive(:shell_out!).with("/usr/sbin/svcadm", "disable", "-s -t", "chef").and_return(@success)
+ expect(@provider).to receive(:shell_out!).with("/usr/sbin/svcadm", "disable", "-s", "-t", "chef").and_return(@success)
@provider.load_current_resource
expect(@provider.disable_service).to be_truthy
expect(@current_resource.enabled).to be_falsey