varnish: fix audit failure and improve test

- "`plist block` (line 31) should be put before `test block` (line 27)";
- At least check the output of sbin/varnishd -V.

Closes #4554.

Signed-off-by: Zhiming Wang <zmwangx@gmail.com>
This commit is contained in:
Zhiming Wang 2016-09-06 00:59:58 -04:00
parent 68088ba7b4
commit 47da28595a
No known key found for this signature in database
GPG key ID: BBD31D4D110044B8

View file

@ -23,10 +23,6 @@ class Varnish < Formula
(var+"varnish").mkpath
end
test do
system "#{opt_sbin}/varnishd", "-V"
end
plist_options :manual => "#{HOMEBREW_PREFIX}/sbin/varnishd -n #{HOMEBREW_PREFIX}/var/varnish -f #{HOMEBREW_PREFIX}/etc/varnish/default.vcl -s malloc,1G -T 127.0.0.1:2000 -a 0.0.0.0:8080"
def plist; <<-EOS.undent
@ -64,4 +60,8 @@ class Varnish < Formula
</plist>
EOS
end
test do
assert_match version.to_s, shell_output("#{sbin}/varnishd -V 2>&1")
end
end