Skip to content

Commit

Permalink
xds: use same format while registering and watching resources (#4422)
Browse files Browse the repository at this point in the history
  • Loading branch information
easwars committed May 12, 2021
1 parent aa59641 commit 8bf65c6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion xds/internal/testutils/e2e/clientresources.go
Expand Up @@ -20,6 +20,8 @@ package e2e

import (
"fmt"
"net"
"strconv"

"github.com/envoyproxy/go-control-plane/pkg/wellknown"
"github.com/golang/protobuf/proto"
Expand Down Expand Up @@ -160,7 +162,7 @@ func DefaultServerListener(host string, port uint32, secLevel SecurityLevel) *v3
}
}
return &v3listenerpb.Listener{
Name: fmt.Sprintf(ServerListenerResourceNameTemplate, fmt.Sprintf("%s:%d", host, port)),
Name: fmt.Sprintf(ServerListenerResourceNameTemplate, net.JoinHostPort(host, strconv.Itoa(int(port)))),
Address: &v3corepb.Address{
Address: &v3corepb.Address_SocketAddress{
SocketAddress: &v3corepb.SocketAddress{
Expand Down

0 comments on commit 8bf65c6

Please sign in to comment.