Remove Port from registry
This commit is contained in:
		| @@ -22,8 +22,7 @@ func TestCallAddress(t *testing.T) { | ||||
| 	var called bool | ||||
| 	service := "test.service" | ||||
| 	endpoint := "Test.Endpoint" | ||||
| 	address := "10.1.10.1" | ||||
| 	port := 8080 | ||||
| 	address := "10.1.10.1:8080" | ||||
|  | ||||
| 	wrap := func(cf CallFunc) CallFunc { | ||||
| 		return func(ctx context.Context, node *registry.Node, req Request, rsp interface{}, opts CallOptions) error { | ||||
| @@ -41,10 +40,6 @@ func TestCallAddress(t *testing.T) { | ||||
| 				return fmt.Errorf("expected address: %s got %s", address, node.Address) | ||||
| 			} | ||||
|  | ||||
| 			if node.Port != port { | ||||
| 				return fmt.Errorf("expected address: %d got %d", port, node.Port) | ||||
| 			} | ||||
|  | ||||
| 			// don't do the call | ||||
| 			return nil | ||||
| 		} | ||||
| @@ -60,7 +55,7 @@ func TestCallAddress(t *testing.T) { | ||||
| 	req := c.NewRequest(service, endpoint, nil) | ||||
|  | ||||
| 	// test calling remote address | ||||
| 	if err := c.Call(context.Background(), req, nil, WithAddress(fmt.Sprintf("%s:%d", address, port))); err != nil { | ||||
| 	if err := c.Call(context.Background(), req, nil, WithAddress(address)); err != nil { | ||||
| 		t.Fatal("call with address error", err) | ||||
| 	} | ||||
|  | ||||
| @@ -114,8 +109,7 @@ func TestCallWrapper(t *testing.T) { | ||||
| 	id := "test.1" | ||||
| 	service := "test.service" | ||||
| 	endpoint := "Test.Endpoint" | ||||
| 	address := "10.1.10.1" | ||||
| 	port := 8080 | ||||
| 	address := "10.1.10.1:8080" | ||||
|  | ||||
| 	wrap := func(cf CallFunc) CallFunc { | ||||
| 		return func(ctx context.Context, node *registry.Node, req Request, rsp interface{}, opts CallOptions) error { | ||||
| @@ -152,7 +146,6 @@ func TestCallWrapper(t *testing.T) { | ||||
| 			®istry.Node{ | ||||
| 				Id:      id, | ||||
| 				Address: address, | ||||
| 				Port:    port, | ||||
| 			}, | ||||
| 		}, | ||||
| 	}) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user