@@ -53,7 +53,7 @@ import {
53
53
saEmail ,
54
54
} from './externalclienthelper' ;
55
55
import { BaseExternalAccountClient } from '../src/auth/baseexternalclient' ;
56
- import { AuthClient } from '../src/auth/authclient' ;
56
+ import { AuthClient , DEFAULT_UNIVERSE } from '../src/auth/authclient' ;
57
57
import { ExternalAccountAuthorizedUserClient } from '../src/auth/externalAccountAuthorizedUserClient' ;
58
58
59
59
nock . disableNetConnect ( ) ;
@@ -1386,6 +1386,7 @@ describe('googleauth', () => {
1386
1386
client_email :
'[email protected] ' ,
1387
1387
private_key : privateKey ,
1388
1388
} ,
1389
+ universeDomain : DEFAULT_UNIVERSE ,
1389
1390
} ) ;
1390
1391
const value = await auth . sign ( data ) ;
1391
1392
const sign = crypto . createSign ( 'RSA-SHA256' ) ;
@@ -1605,7 +1606,9 @@ describe('googleauth', () => {
1605
1606
// Set up a mock to explicity return the Project ID, as needed for impersonated ADC
1606
1607
mockEnvVar ( 'GCLOUD_PROJECT' , STUB_PROJECT ) ;
1607
1608
1608
- const auth = new GoogleAuth ( ) ;
1609
+ const auth = new GoogleAuth ( {
1610
+ universeDomain : DEFAULT_UNIVERSE ,
1611
+ } ) ;
1609
1612
const client = await auth . getClient ( ) ;
1610
1613
1611
1614
const email = '[email protected] ' ;
@@ -2309,6 +2312,7 @@ describe('googleauth', () => {
2309
2312
it ( 'should reject when no impersonation is used' , async ( ) => {
2310
2313
const auth = new GoogleAuth ( {
2311
2314
credentials : createExternalAccountJSON ( ) ,
2315
+ universeDomain : DEFAULT_UNIVERSE ,
2312
2316
} ) ;
2313
2317
2314
2318
await assert . rejects (
@@ -2347,7 +2351,10 @@ describe('googleauth', () => {
2347
2351
)
2348
2352
. reply ( 200 , { signedBlob} )
2349
2353
) ;
2350
- const auth = new GoogleAuth ( { credentials : configWithImpersonation } ) ;
2354
+ const auth = new GoogleAuth ( {
2355
+ credentials : configWithImpersonation ,
2356
+ universeDomain : DEFAULT_UNIVERSE ,
2357
+ } ) ;
2351
2358
2352
2359
const value = await auth . sign ( data ) ;
2353
2360
@@ -2357,7 +2364,10 @@ describe('googleauth', () => {
2357
2364
} ) ;
2358
2365
2359
2366
it ( 'getIdTokenClient() should reject' , async ( ) => {
2360
- const auth = new GoogleAuth ( { credentials : createExternalAccountJSON ( ) } ) ;
2367
+ const auth = new GoogleAuth ( {
2368
+ credentials : createExternalAccountJSON ( ) ,
2369
+ universeDomain : DEFAULT_UNIVERSE ,
2370
+ } ) ;
2361
2371
2362
2372
await assert . rejects (
2363
2373
auth . getIdTokenClient ( 'a-target-audience' ) ,
@@ -2536,6 +2546,7 @@ describe('googleauth', () => {
2536
2546
it ( 'should reject' , async ( ) => {
2537
2547
const auth = new GoogleAuth ( {
2538
2548
credentials : createExternalAccountAuthorizedUserJson ( ) ,
2549
+ universeDomain : DEFAULT_UNIVERSE ,
2539
2550
} ) ;
2540
2551
2541
2552
await assert . rejects (
0 commit comments