Fix breaks related to removing node.port
This commit is contained in:
19
http_test.go
19
http_test.go
@@ -8,7 +8,6 @@ import (
|
||||
"io/ioutil"
|
||||
"net"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"testing"
|
||||
|
||||
"github.com/micro/go-micro/client"
|
||||
@@ -68,19 +67,12 @@ func TestHTTPClient(t *testing.T) {
|
||||
})
|
||||
go http.Serve(l, mux)
|
||||
|
||||
host, sport, err := net.SplitHostPort(l.Addr().String())
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
port, _ := strconv.Atoi(sport)
|
||||
|
||||
if err := r.Register(®istry.Service{
|
||||
Name: "test.service",
|
||||
Nodes: []*registry.Node{
|
||||
{
|
||||
Id: "test.service.1",
|
||||
Address: host,
|
||||
Port: port,
|
||||
Address: l.Addr().String(),
|
||||
},
|
||||
},
|
||||
}); err != nil {
|
||||
@@ -231,19 +223,12 @@ func TestHTTPClientStream(t *testing.T) {
|
||||
})
|
||||
go http.Serve(l, mux)
|
||||
|
||||
host, sport, err := net.SplitHostPort(l.Addr().String())
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
port, _ := strconv.Atoi(sport)
|
||||
|
||||
if err := r.Register(®istry.Service{
|
||||
Name: "test.service",
|
||||
Nodes: []*registry.Node{
|
||||
{
|
||||
Id: "test.service.1",
|
||||
Address: host,
|
||||
Port: port,
|
||||
Address: l.Addr().String(),
|
||||
},
|
||||
},
|
||||
}); err != nil {
|
||||
|
Reference in New Issue
Block a user