From 3e33aafeeca41ae01a90c95cedc08cc41cfc934c Mon Sep 17 00:00:00 2001 From: Jan Chaloupka jchaloup@redhat.com Date: Tue, 1 Sep 2015 01:13:51 +0200 Subject: Add missing patch
diff --git a/change-default-ports.patch b/change-default-ports.patch new file mode 100644 index 0000000..0674c4a --- /dev/null +++ b/change-default-ports.patch @@ -0,0 +1,93 @@ +From 7bc1b967d249695cb96974a04314f5b258a83abd Mon Sep 17 00:00:00 2001 +From: Jan Chaloupka jchaloup@redhat.com +Date: Mon, 31 Aug 2015 21:36:58 +0200 +Subject: [PATCH] change default ports + +--- + etcd/client.go | 2 +- + etcd/client_test.go | 8 ++++---- + etcd/cluster.go | 2 +- + etcd/member_test.go | 4 ++-- + 4 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/etcd/client.go b/etcd/client.go +index 727e5df..7ed6388 100644 +--- a/etcd/client.go ++++ b/etcd/client.go +@@ -95,7 +95,7 @@ func NewClient(machines []string) *Client { + func NewTLSClient(machines []string, cert, key, caCert string) (*Client, error) { + // overwrite the default machine to use https + if len(machines) == 0 { +- machines = []string{"https://127.0.0.1:4001%22%7D ++ machines = []string{"https://127.0.0.1:2379%22%7D + } + + config := Config{ +diff --git a/etcd/client_test.go b/etcd/client_test.go +index 4720d8d..052114e 100644 +--- a/etcd/client_test.go ++++ b/etcd/client_test.go +@@ -10,13 +10,13 @@ import ( + ) + + // To pass this test, we need to create a cluster of 3 machines +-// The server should be listening on localhost:4001, 4002, 4003 ++// The server should be listening on localhost:2379, 4002, 4003 + func TestSync(t *testing.T) { +- fmt.Println("Make sure there are three nodes at 0.0.0.0:4001-4003") ++ fmt.Println("Make sure there are three nodes at 0.0.0.0:2379-4003") + + // Explicit trailing slash to ensure this doesn't reproduce: + // https://github.com/coreos/go-etcd/issues/82 +- c := NewClient([]string{"http://127.0.0.1:4001/%22%7D) ++ c := NewClient([]string{"http://127.0.0.1:2379/%22%7D) + + success := c.SyncCluster() + if !success { +@@ -96,7 +96,7 @@ func TestPersistence(t *testing.T) { + } + + func TestClientRetry(t *testing.T) { +- c := NewClient([]string{"http://strange", "http://127.0.0.1:4001%22%7D) ++ c := NewClient([]string{"http://strange", "http://127.0.0.1:2379%22%7D) + // use first endpoint as the picked url + c.cluster.picked = 0 + if _, err := c.Set("foo", "bar", 5); err != nil { +diff --git a/etcd/cluster.go b/etcd/cluster.go +index 1ad3e15..fe33275 100644 +--- a/etcd/cluster.go ++++ b/etcd/cluster.go +@@ -14,7 +14,7 @@ type Cluster struct { + func NewCluster(machines []string) *Cluster { + // if an empty slice was sent in then just assume HTTP 4001 on localhost + if len(machines) == 0 { +- machines = []string{"http://127.0.0.1:4001%22%7D ++ machines = []string{"http://127.0.0.1:2379%22%7D + } + + // default leader and machines +diff --git a/etcd/member_test.go b/etcd/member_test.go +index 53ebdd4..b3439a7 100644 +--- a/etcd/member_test.go ++++ b/etcd/member_test.go +@@ -16,7 +16,7 @@ func TestMemberCollectionUnmarshal(t *testing.T) { + want: memberCollection([]Member{}), + }, + { +- body: []byte(`{"members":[{"id":"2745e2525fce8fe","peerURLs":["http://127.0.0.1:7003%22%5D,%22name%22:%22node3%22,%22clientURLs%22:%5B%22ht...), ++ body: []byte(`{"members":[{"id":"2745e2525fce8fe","peerURLs":["http://127.0.0.1:7003%22%5D,%22name%22:%22node3%22,%22clientURLs%22:%5B%22ht...), + want: memberCollection( + []Member{ + { +@@ -38,7 +38,7 @@ func TestMemberCollectionUnmarshal(t *testing.T) { + }, + ClientURLs: []string{ + "http://127.0.0.1:2379", +- "http://127.0.0.1:4001", ++ "http://127.0.0.1:2379", + }, + }, + { +-- +1.9.3 +
scm-commits@lists.fedoraproject.org