mesos: cleanup formula.

Closes Homebrew/homebrew#30045.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Bulat Shakirzyanov 2014-07-01 23:29:32 +01:00 committed by Mike McQuaid
parent f485995df8
commit cd5e9d9f40

View file

@ -37,6 +37,24 @@ class Mesos < Formula
end
test do
system "#{sbin}/mesos-master", "--version"
require "timeout"
master = fork do
exec "#{sbin}/mesos-master", "--ip=127.0.0.1",
"--registry=in_memory"
end
slave = fork do
exec "#{sbin}/mesos-slave", "--master=127.0.0.1:5050",
"--work_dir=#{testpath}"
end
Timeout::timeout(15) do
system "#{bin}/mesos", "execute",
"--master=127.0.0.1:5050",
"--name=execute-touch",
"--command=touch\s#{testpath}/executed"
end
Process.kill("TERM", master)
Process.kill("TERM", slave)
system "[ -e #{testpath}/executed ]"
end
end