summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorLance Albertson <lance@osuosl.org>2021-05-01 21:32:14 -0700
committerLance Albertson <lance@osuosl.org>2021-05-03 00:03:49 -0700
commit1e0f202e3cb0f62890a10be0cf3251d35ab0aea6 (patch)
tree9c1edc7166f34a806ee783868d99e23d060db84f /spec
parent1e086908ba9862123ff7d6211ee98563166a7804 (diff)
downloadchef-1e0f202e3cb0f62890a10be0cf3251d35ab0aea6.tar.gz
Fix systemd service state detection
Resolves #11496 This adds a missing double splat which is required when using Ruby 3.0. Signed-off-by: Lance Albertson <lance@osuosl.org>
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/provider/service/systemd_service_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/provider/service/systemd_service_spec.rb b/spec/unit/provider/service/systemd_service_spec.rb
index ed6e3f989e..4f38ed5465 100644
--- a/spec/unit/provider/service/systemd_service_spec.rb
+++ b/spec/unit/provider/service/systemd_service_spec.rb
@@ -313,7 +313,7 @@ describe Chef::Provider::Service::Systemd do
def with_systemctl_show(systemctl_path, stdout)
systemctl_show = [systemctl_path, "--system", "show", "-p", "UnitFileState", "-p", "ActiveState", service_name]
- expect(provider).to receive(:shell_out!).with(*systemctl_show, {}).and_return(double(stdout: stdout, exitstatus: 0, error?: false))
+ expect(provider).to receive(:shell_out!).with(*systemctl_show).and_return(double(stdout: stdout, exitstatus: 0, error?: false))
end
describe "systemd_service_status" do
@@ -341,7 +341,7 @@ describe Chef::Provider::Service::Systemd do
it "should error if '#{systemctl_path} --system show -p UnitFileState -p ActiveState service_name' returns non 0" do
systemctl_show = [systemctl_path, "--system", "show", "-p", "UnitFileState", "-p", "ActiveState", service_name]
- allow(provider).to receive(:shell_out!).with(*systemctl_show, {}).and_return(shell_out_failure)
+ allow(provider).to receive(:shell_out!).with(*systemctl_show).and_return(shell_out_failure)
expect { provider.systemd_service_status }.to raise_error(Chef::Exceptions::Service)
end
end