@@ -157,7 +157,8 @@ func initIntegrationTest() func() {
157
157
}
158
158
bqOpts := []option.ClientOption {option .WithTokenSource (ts )}
159
159
sOpts := []option.ClientOption {option .WithTokenSource (testutil .TokenSource (ctx , storage .ScopeFullControl ))}
160
- ptmOpts := []option.ClientOption {option .WithTokenSource (testutil .TokenSource (ctx , "https://www.googleapis.com/auth/cloud-platform" ))}
160
+ ptmOpts := []option.ClientOption {option .WithTokenSource (testutil .TokenSource (ctx , datacatalog .DefaultAuthScopes ()... ))}
161
+ connOpts := []option.ClientOption {option .WithTokenSource (testutil .TokenSource (ctx , connection .DefaultAuthScopes ()... ))}
161
162
cleanup := func () {}
162
163
now := time .Now ().UTC ()
163
164
if * record {
@@ -196,6 +197,7 @@ func initIntegrationTest() func() {
196
197
bqOpts = append (bqOpts , grpcHeadersChecker .CallOptions ()... )
197
198
sOpts = append (sOpts , grpcHeadersChecker .CallOptions ()... )
198
199
ptmOpts = append (ptmOpts , grpcHeadersChecker .CallOptions ()... )
200
+ connOpts = append (sOpts , grpcHeadersChecker .CallOptions ()... )
199
201
}
200
202
var err error
201
203
client , err = NewClient (ctx , projID , bqOpts ... )
@@ -210,7 +212,7 @@ func initIntegrationTest() func() {
210
212
if err != nil {
211
213
log .Fatalf ("datacatalog.NewPolicyTagManagerClient: %v" , err )
212
214
}
213
- connectionsClient , err = connection .NewClient (ctx , sOpts ... )
215
+ connectionsClient , err = connection .NewClient (ctx , connOpts ... )
214
216
if err != nil {
215
217
log .Fatalf ("connection.NewService: %v" , err )
216
218
}
0 commit comments