service(systemd): launch_only_once test
This commit is contained in:
parent
12bf07a6ba
commit
53d37cc84c
@ -291,10 +291,11 @@ describe Homebrew::Service do
|
|||||||
expect(unit).to eq(unit_expect.strip)
|
expect(unit).to eq(unit_expect.strip)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "returns valid partial unit" do
|
it "returns valid partial oneshot unit" do
|
||||||
f.class.service do
|
f.class.service do
|
||||||
run opt_bin/"beanstalkd"
|
run opt_bin/"beanstalkd"
|
||||||
run_type :immediate
|
run_type :immediate
|
||||||
|
launch_only_once true
|
||||||
end
|
end
|
||||||
|
|
||||||
unit = f.service.to_systemd_unit
|
unit = f.service.to_systemd_unit
|
||||||
@ -306,10 +307,10 @@ describe Homebrew::Service do
|
|||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=oneshot
|
||||||
ExecStart=#{HOMEBREW_PREFIX}/opt/#{name}/bin/beanstalkd
|
ExecStart=#{HOMEBREW_PREFIX}/opt/#{name}/bin/beanstalkd
|
||||||
EOS
|
EOS
|
||||||
expect(unit).to eq(unit_expect)
|
expect(unit).to eq(unit_expect.strip)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user