From 53d37cc84cbb9dfa5315ce96542637595fe4ab01 Mon Sep 17 00:00:00 2001 From: NickHackman Date: Fri, 11 Feb 2022 14:48:05 -0600 Subject: [PATCH] service(systemd): launch_only_once test --- Library/Homebrew/test/service_spec.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/test/service_spec.rb b/Library/Homebrew/test/service_spec.rb index b1d10b74a2..72e587f07f 100644 --- a/Library/Homebrew/test/service_spec.rb +++ b/Library/Homebrew/test/service_spec.rb @@ -291,10 +291,11 @@ describe Homebrew::Service do expect(unit).to eq(unit_expect.strip) end - it "returns valid partial unit" do + it "returns valid partial oneshot unit" do f.class.service do run opt_bin/"beanstalkd" run_type :immediate + launch_only_once true end unit = f.service.to_systemd_unit @@ -306,10 +307,10 @@ describe Homebrew::Service do WantedBy=multi-user.target [Service] - Type=simple + Type=oneshot ExecStart=#{HOMEBREW_PREFIX}/opt/#{name}/bin/beanstalkd EOS - expect(unit).to eq(unit_expect) + expect(unit).to eq(unit_expect.strip) end end