Skip to content

Commit

Permalink
fix(bigquery): bq connection auth scopes (googleapis#6752)
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarowolfx committed Sep 27, 2022
1 parent 7163486 commit 8e09288
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bigquery/integration_test.go
Expand Up @@ -157,7 +157,8 @@ func initIntegrationTest() func() {
}
bqOpts := []option.ClientOption{option.WithTokenSource(ts)}
sOpts := []option.ClientOption{option.WithTokenSource(testutil.TokenSource(ctx, storage.ScopeFullControl))}
ptmOpts := []option.ClientOption{option.WithTokenSource(testutil.TokenSource(ctx, "https://www.googleapis.com/auth/cloud-platform"))}
ptmOpts := []option.ClientOption{option.WithTokenSource(testutil.TokenSource(ctx, datacatalog.DefaultAuthScopes()...))}
connOpts := []option.ClientOption{option.WithTokenSource(testutil.TokenSource(ctx, connection.DefaultAuthScopes()...))}
cleanup := func() {}
now := time.Now().UTC()
if *record {
Expand Down Expand Up @@ -196,6 +197,7 @@ func initIntegrationTest() func() {
bqOpts = append(bqOpts, grpcHeadersChecker.CallOptions()...)
sOpts = append(sOpts, grpcHeadersChecker.CallOptions()...)
ptmOpts = append(ptmOpts, grpcHeadersChecker.CallOptions()...)
connOpts = append(sOpts, grpcHeadersChecker.CallOptions()...)
}
var err error
client, err = NewClient(ctx, projID, bqOpts...)
Expand All @@ -210,7 +212,7 @@ func initIntegrationTest() func() {
if err != nil {
log.Fatalf("datacatalog.NewPolicyTagManagerClient: %v", err)
}
connectionsClient, err = connection.NewClient(ctx, sOpts...)
connectionsClient, err = connection.NewClient(ctx, connOpts...)
if err != nil {
log.Fatalf("connection.NewService: %v", err)
}
Expand Down

0 comments on commit 8e09288

Please sign in to comment.