etcd 3.0.1
use full path in the test Closes #2537. Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
parent
712e39650c
commit
0fae1a21bf
1 changed files with 9 additions and 11 deletions
|
@ -1,8 +1,8 @@
|
|||
class Etcd < Formula
|
||||
desc "Key value store for shared configuration and service discovery"
|
||||
homepage "https://github.com/coreos/etcd"
|
||||
url "https://github.com/coreos/etcd/archive/v2.2.5.tar.gz"
|
||||
sha256 "a7fb7998ada620fda74e517c100891d25a15a6fa20b627df52da7cd29328e6d5"
|
||||
url "https://github.com/coreos/etcd/archive/v3.0.1.tar.gz"
|
||||
sha256 "29ccdf960a3bdb72bff3f9082c2ce14a909fe9156e3309afd7288cb3e050dd2d"
|
||||
head "https://github.com/coreos/etcd.git"
|
||||
|
||||
bottle do
|
||||
|
@ -12,21 +12,19 @@ class Etcd < Formula
|
|||
sha256 "77e16e9d78546f5dd81d452afeae71828f7a239d47993cc5edaf457315f616b8" => :mavericks
|
||||
end
|
||||
|
||||
devel do
|
||||
url "https://github.com/coreos/etcd/archive/v2.3.0-alpha.0.tar.gz"
|
||||
version "2.3.0-alpha.0"
|
||||
sha256 "6603684824a650c472c791fc7c4cdf6811920f473e01bcfe8b1d95b0fd1f25c6"
|
||||
end
|
||||
|
||||
depends_on "go" => :build
|
||||
|
||||
def install
|
||||
ENV["GOPATH"] = buildpath
|
||||
mkdir_p "src/github.com/coreos"
|
||||
ln_s buildpath, "src/github.com/coreos/etcd"
|
||||
system "./build"
|
||||
bin.install "bin/etcd"
|
||||
bin.install "bin/etcdctl"
|
||||
end
|
||||
|
||||
plist_options :manual => "etcd"
|
||||
|
||||
def plist; <<-EOS.undent
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
|
@ -57,13 +55,13 @@ class Etcd < Formula
|
|||
require "utils/json"
|
||||
test_string = "Hello from brew test!"
|
||||
etcd_pid = fork do
|
||||
exec "etcd", "--force-new-cluster", "--data-dir=#{testpath}"
|
||||
exec bin/"etcd", "--force-new-cluster", "--data-dir=#{testpath}"
|
||||
end
|
||||
# sleep to let etcd get its wits about it
|
||||
sleep 10
|
||||
etcd_uri = "http://127.0.0.1:4001/v2/keys/brew_test"
|
||||
etcd_uri = "http://127.0.0.1:2379/v2/keys/brew_test"
|
||||
system "curl", "--silent", "-L", etcd_uri, "-XPUT", "-d", "value=#{test_string}"
|
||||
curl_output = shell_output "curl --silent -L #{etcd_uri}"
|
||||
curl_output = shell_output("curl --silent -L #{etcd_uri}")
|
||||
response_hash = Utils::JSON.load(curl_output)
|
||||
assert_match(test_string, response_hash.fetch("node").fetch("value"))
|
||||
ensure
|
||||
|
|
Loading…
Reference in a new issue