mirror of https://github.com/hashicorp/consul
agent: remove ConnectProxyServiceName
parent
2feef5f7a3
commit
3b07686648
|
@ -78,8 +78,8 @@ func TestAgent_Services_ConnectProxy(t *testing.T) {
|
||||||
|
|
||||||
srv1 := &structs.NodeService{
|
srv1 := &structs.NodeService{
|
||||||
Kind: structs.ServiceKindConnectProxy,
|
Kind: structs.ServiceKindConnectProxy,
|
||||||
ID: structs.ConnectProxyServiceName,
|
ID: "db-proxy",
|
||||||
Service: structs.ConnectProxyServiceName,
|
Service: "db-proxy",
|
||||||
Port: 5000,
|
Port: 5000,
|
||||||
ProxyDestination: "db",
|
ProxyDestination: "db",
|
||||||
}
|
}
|
||||||
|
@ -90,7 +90,7 @@ func TestAgent_Services_ConnectProxy(t *testing.T) {
|
||||||
assert.Nil(err)
|
assert.Nil(err)
|
||||||
val := obj.(map[string]*structs.NodeService)
|
val := obj.(map[string]*structs.NodeService)
|
||||||
assert.Len(val, 1)
|
assert.Len(val, 1)
|
||||||
actual := val[structs.ConnectProxyServiceName]
|
actual := val["db-proxy"]
|
||||||
assert.Equal(structs.ServiceKindConnectProxy, actual.Kind)
|
assert.Equal(structs.ServiceKindConnectProxy, actual.Kind)
|
||||||
assert.Equal("db", actual.ProxyDestination)
|
assert.Equal("db", actual.ProxyDestination)
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,4 @@ const (
|
||||||
// Consul server node in the catalog.
|
// Consul server node in the catalog.
|
||||||
ConsulServiceID = "consul"
|
ConsulServiceID = "consul"
|
||||||
ConsulServiceName = "consul"
|
ConsulServiceName = "consul"
|
||||||
|
|
||||||
// ConnectProxyServiceName is the name of the proxy services.
|
|
||||||
ConnectProxyServiceName = "connect-proxy"
|
|
||||||
)
|
)
|
||||||
|
|
|
@ -34,7 +34,7 @@ func TestRegisterRequestProxy(t testing.T) *RegisterRequest {
|
||||||
func TestNodeServiceProxy(t testing.T) *NodeService {
|
func TestNodeServiceProxy(t testing.T) *NodeService {
|
||||||
return &NodeService{
|
return &NodeService{
|
||||||
Kind: ServiceKindConnectProxy,
|
Kind: ServiceKindConnectProxy,
|
||||||
Service: ConnectProxyServiceName,
|
Service: "connect-proxy",
|
||||||
Address: "127.0.0.2",
|
Address: "127.0.0.2",
|
||||||
Port: 2222,
|
Port: 2222,
|
||||||
ProxyDestination: "web",
|
ProxyDestination: "web",
|
||||||
|
|
Loading…
Reference in New Issue