agent: remove ConnectProxyServiceName

This commit is contained in:
Mitchell Hashimoto 2018-03-11 09:31:31 -07:00
parent 566c98b2fc
commit 4cc4de1ff6
No known key found for this signature in database
GPG Key ID: 744E147AA52F5B0A
3 changed files with 4 additions and 7 deletions

View File

@ -78,8 +78,8 @@ func TestAgent_Services_ConnectProxy(t *testing.T) {
srv1 := &structs.NodeService{
Kind: structs.ServiceKindConnectProxy,
ID: structs.ConnectProxyServiceName,
Service: structs.ConnectProxyServiceName,
ID: "db-proxy",
Service: "db-proxy",
Port: 5000,
ProxyDestination: "db",
}
@ -90,7 +90,7 @@ func TestAgent_Services_ConnectProxy(t *testing.T) {
assert.Nil(err)
val := obj.(map[string]*structs.NodeService)
assert.Len(val, 1)
actual := val[structs.ConnectProxyServiceName]
actual := val["db-proxy"]
assert.Equal(structs.ServiceKindConnectProxy, actual.Kind)
assert.Equal("db", actual.ProxyDestination)
}

View File

@ -18,7 +18,4 @@ const (
// Consul server node in the catalog.
ConsulServiceID = "consul"
ConsulServiceName = "consul"
// ConnectProxyServiceName is the name of the proxy services.
ConnectProxyServiceName = "connect-proxy"
)

View File

@ -34,7 +34,7 @@ func TestRegisterRequestProxy(t testing.T) *RegisterRequest {
func TestNodeServiceProxy(t testing.T) *NodeService {
return &NodeService{
Kind: ServiceKindConnectProxy,
Service: ConnectProxyServiceName,
Service: "connect-proxy",
Address: "127.0.0.2",
Port: 2222,
ProxyDestination: "web",