Skip to content

Commit 43f2eb8

Browse files
committed
change needed for grpctransport new changes
1 parent 6eadfdd commit 43f2eb8

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

xds/internal/clients/xdsclient/test/metrics_test.go

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import (
2424
"testing"
2525

2626
"github.com/google/uuid"
27-
"google.golang.org/grpc/credentials"
2827
"google.golang.org/grpc/credentials/insecure"
2928
"google.golang.org/grpc/internal/testutils"
3029
"google.golang.org/grpc/xds/internal/clients"
@@ -66,13 +65,13 @@ func (s) TestResourceUpdateMetrics(t *testing.T) {
6665
resourceTypes := map[string]xdsclient.ResourceType{xdsresource.V3ListenerURL: listenerType}
6766
si := clients.ServerIdentifier{
6867
ServerURI: mgmtServer.Address,
69-
Extensions: grpctransport.ServerIdentifierExtension{Credentials: "insecure"},
68+
Extensions: grpctransport.ServerIdentifierExtension{ConfigName: "insecure"},
7069
}
71-
credentials := map[string]credentials.Bundle{"insecure": insecure.NewBundle()}
70+
configs := map[string]grpctransport.Config{"insecure": {Credentials: insecure.NewBundle()}}
7271
xdsClientConfig := xdsclient.Config{
7372
Servers: []xdsclient.ServerConfig{{ServerIdentifier: si}},
7473
Node: clients.Node{ID: nodeID},
75-
TransportBuilder: grpctransport.NewBuilder(credentials),
74+
TransportBuilder: grpctransport.NewBuilder(configs),
7675
ResourceTypes: resourceTypes,
7776
// Xdstp resource names used in this test do not specify an
7877
// authority. These will end up looking up an entry with the
@@ -153,13 +152,13 @@ func (s) TestServerFailureMetrics_BeforeResponseRecv(t *testing.T) {
153152
resourceTypes := map[string]xdsclient.ResourceType{xdsresource.V3ListenerURL: listenerType}
154153
si := clients.ServerIdentifier{
155154
ServerURI: mgmtServer.Address,
156-
Extensions: grpctransport.ServerIdentifierExtension{Credentials: "insecure"},
155+
Extensions: grpctransport.ServerIdentifierExtension{ConfigName: "insecure"},
157156
}
158-
credentials := map[string]credentials.Bundle{"insecure": insecure.NewBundle()}
157+
configs := map[string]grpctransport.Config{"insecure": {Credentials: insecure.NewBundle()}}
159158
xdsClientConfig := xdsclient.Config{
160159
Servers: []xdsclient.ServerConfig{{ServerIdentifier: si}},
161160
Node: clients.Node{ID: nodeID},
162-
TransportBuilder: grpctransport.NewBuilder(credentials),
161+
TransportBuilder: grpctransport.NewBuilder(configs),
163162
ResourceTypes: resourceTypes,
164163
// Xdstp resource names used in this test do not specify an
165164
// authority. These will end up looking up an entry with the
@@ -235,13 +234,13 @@ func (s) TestServerFailureMetrics_AfterResponseRecv(t *testing.T) {
235234
resourceTypes := map[string]xdsclient.ResourceType{xdsresource.V3ListenerURL: listenerType}
236235
si := clients.ServerIdentifier{
237236
ServerURI: mgmtServer.Address,
238-
Extensions: grpctransport.ServerIdentifierExtension{Credentials: "insecure"},
237+
Extensions: grpctransport.ServerIdentifierExtension{ConfigName: "insecure"},
239238
}
240-
credentials := map[string]credentials.Bundle{"insecure": insecure.NewBundle()}
239+
configs := map[string]grpctransport.Config{"insecure": {Credentials: insecure.NewBundle()}}
241240
xdsClientConfig := xdsclient.Config{
242241
Servers: []xdsclient.ServerConfig{{ServerIdentifier: si}},
243242
Node: clients.Node{ID: nodeID},
244-
TransportBuilder: grpctransport.NewBuilder(credentials),
243+
TransportBuilder: grpctransport.NewBuilder(configs),
245244
ResourceTypes: resourceTypes,
246245
// Xdstp resource names used in this test do not specify an
247246
// authority. These will end up looking up an entry with the

0 commit comments

Comments
 (0)