[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fedora-extras-commits
Subject:    jchaloup pushed to golang-github-coreos-go-etcd (f22). "Add missing patch"
From:       notifications () fedoraproject ! org
Date:       2015-08-31 23:14:26
Message-ID: 20150831231426.77B906076F42 () bastion01 ! phx2 ! fedoraproject ! org
[Download RAW message or body]

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"}
++		machines = []string{"https://127.0.0.1:2379"}
+ 	}
+ 
+ 	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/"})
++	c := NewClient([]string{"http://127.0.0.1:2379/"})
+ 
+ 	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"})
++	c := NewClient([]string{"http://strange", "http://127.0.0.1:2379"})
+ 	// 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"}
++		machines = []string{"http://127.0.0.1:2379"}
+ 	}
+ 
+ 	// 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:7 \
003"],"name":"node3","clientURLs":["http://127.0.0.1:4003"]},{"id":"42134f434382925"," \
peerURLs":["http://127.0.0.1:2380","http://127.0.0.1:7001"],"name":"node1","clientURLs \
":["http://127.0.0.1:2379","http://127.0.0.1:4001"]},{"id":"94088180e21eb87b","peerURL \
s":["http://127.0.0.1:7002"],"name":"node2","clientURLs":["http://127.0.0.1:4002"]}]}`),
 ++			body: []byte(`{"members":[{"id":"2745e2525fce8fe","peerURLs":["http://127.0.0.1: \
7003"],"name":"node3","clientURLs":["http://127.0.0.1:4003"]},{"id":"42134f434382925", \
"peerURLs":["http://127.0.0.1:2380","http://127.0.0.1:7001"],"name":"node1","clientURL \
s":["http://127.0.0.1:2379","http://127.0.0.1:2379"]},{"id":"94088180e21eb87b","peerUR \
Ls":["http://127.0.0.1:7002"],"name":"node2","clientURLs":["http://127.0.0.1:4002"]}]}`),
 + 			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
+
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/golang-github-coreos-go-etcd.git/commit/?h=f22&id=3e33aafeeca41ae01a90c95cedc08cc41cfc934c
                
--
scm-commits mailing list
scm-commits@lists.fedoraproject.org
http://lists.fedoraproject.org/postorius/scm-commits@lists.fedoraproject.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic