Skip to content

Commit

Permalink
etcd 3.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
chenrui333 committed Sep 3, 2019
1 parent 3ff183d commit 288dc8f
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Formula/etcd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ class Etcd < Formula
desc "Key value store for shared configuration and service discovery"
homepage "https://github.com/etcd-io/etcd"
url "https://github.com/etcd-io/etcd.git",
:tag => "v3.3.15",
:revision => "94745a4eed0425653b3b4275a208d38babceeaec"
:tag => "v3.4.0",
:revision => "898bd1351fcf6e0ebce8d7c8bbbbf3f3e42aa42c"
head "https://github.com/etcd-io/etcd.git"

bottle do
Expand Down Expand Up @@ -58,15 +58,18 @@ def plist; <<~EOS
end

test do
ENV["ETCDCTL_API"] = "3"

begin
test_string = "Hello from brew test!"
etcd_pid = fork do
exec bin/"etcd", "--force-new-cluster", "--data-dir=#{testpath}"
exec bin/"etcd",
"--enable-v2", # enable etcd v2 client support
"--force-new-cluster",
"--logger=zap", # default logger (`capnslog`) to be deprecated in v3.5
"--data-dir=#{testpath}"
end
# sleep to let etcd get its wits about it
sleep 10

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}")
Expand Down

0 comments on commit 288dc8f

Please sign in to comment.