Skip to content

Commit

Permalink
DirectPath: make ComputeEngineCredentials support non-default service…
Browse files Browse the repository at this point in the history
… account
  • Loading branch information
mohanli-ml committed Sep 14, 2021
1 parent 10790dc commit e9b5071
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion credentials/google/google_test.go
Expand Up @@ -77,7 +77,7 @@ func TestClientHandshakeBasedOnClusterName(t *testing.T) {
defer overrideNewCredsFuncs()()
for bundleTyp, tc := range map[string]credentials.Bundle{
"defaultCreds": NewDefaultCredentials(),
"computeCreds": NewComputeEngineCredentials(),
"computeCreds": NewComputeEngineCredentials(nil),
} {
tests := []struct {
name string
Expand Down
2 changes: 1 addition & 1 deletion interop/client/client.go
Expand Up @@ -174,7 +174,7 @@ func main() {
case credsGoogleDefaultCreds:
opts = append(opts, grpc.WithCredentialsBundle(google.NewDefaultCredentials()))
case credsComputeEngineCreds:
opts = append(opts, grpc.WithCredentialsBundle(google.NewComputeEngineCredentials()))
opts = append(opts, grpc.WithCredentialsBundle(google.NewComputeEngineCredentials(nil)))
case credsNone:
opts = append(opts, grpc.WithInsecure())
default:
Expand Down
2 changes: 1 addition & 1 deletion interop/grpclb_fallback/client_linux.go
Expand Up @@ -110,7 +110,7 @@ func createTestConn() *grpc.ClientConn {
case "google_default_credentials":
opts = append(opts, grpc.WithCredentialsBundle(google.NewDefaultCredentials()))
case "compute_engine_channel_creds":
opts = append(opts, grpc.WithCredentialsBundle(google.NewComputeEngineCredentials()))
opts = append(opts, grpc.WithCredentialsBundle(google.NewComputeEngineCredentials(nil)))
default:
errorLog.Fatalf("Invalid --custom_credentials_type:%v", *customCredentialsType)
}
Expand Down
8 changes: 4 additions & 4 deletions xds/internal/xdsclient/bootstrap/bootstrap_test.go
Expand Up @@ -213,12 +213,12 @@ var (
}
nonNilCredsConfigV2 = &Config{
BalancerName: "trafficdirector.googleapis.com:443",
Creds: grpc.WithCredentialsBundle(google.NewComputeEngineCredentials()),
Creds: grpc.WithCredentialsBundle(google.NewComputeEngineCredentials(nil)),
NodeProto: v2NodeProto,
}
nonNilCredsConfigV3 = &Config{
BalancerName: "trafficdirector.googleapis.com:443",
Creds: grpc.WithCredentialsBundle(google.NewComputeEngineCredentials()),
Creds: grpc.WithCredentialsBundle(google.NewComputeEngineCredentials(nil)),
TransportAPI: version.TransportV3,
NodeProto: v3NodeProto,
}
Expand Down Expand Up @@ -671,7 +671,7 @@ func TestNewConfigWithCertificateProviders(t *testing.T) {

goodConfig := &Config{
BalancerName: "trafficdirector.googleapis.com:443",
Creds: grpc.WithCredentialsBundle(google.NewComputeEngineCredentials()),
Creds: grpc.WithCredentialsBundle(google.NewComputeEngineCredentials(nil)),
TransportAPI: version.TransportV3,
NodeProto: v3NodeProto,
CertProviderConfigs: map[string]*certprovider.BuildableConfig{
Expand Down Expand Up @@ -761,7 +761,7 @@ func TestNewConfigWithServerListenerResourceNameTemplate(t *testing.T) {
name: "goodServerListenerResourceNameTemplate",
wantConfig: &Config{
BalancerName: "trafficdirector.googleapis.com:443",
Creds: grpc.WithCredentialsBundle(google.NewComputeEngineCredentials()),
Creds: grpc.WithCredentialsBundle(google.NewComputeEngineCredentials(nil)),
TransportAPI: version.TransportV2,
NodeProto: v2NodeProto,
ServerListenerResourceNameTemplate: "grpc/server?xds.resource.listening_address=%s",
Expand Down

0 comments on commit e9b5071

Please sign in to comment.