@@ -72,6 +72,9 @@ describe('jwt', () => {
7272 json = createJSON ( ) ;
7373 jwt = new JWT ( ) ;
7474 sandbox = sinon . createSandbox ( ) ;
75+ sandbox
76+ . stub ( JWT . prototype , 'getRegionalAccessBoundaryUrl' )
77+ . resolves ( undefined ) ;
7578 } ) ;
7679
7780 afterEach ( ( ) => {
@@ -1277,11 +1280,10 @@ describe('jwt', () => {
12771280
12781281 beforeEach ( ( ) => {
12791282 sandbox = sinon . createSandbox ( ) ;
1280- process . env [ 'GOOGLE_AUTH_TRUST_BOUNDARY_ENABLE_EXPERIMENT' ] = 'true' ;
1283+ ( JWT . prototype . getRegionalAccessBoundaryUrl as sinon . SinonStub ) . restore ( ) ;
12811284 } ) ;
12821285
12831286 afterEach ( ( ) => {
1284- delete process . env [ 'GOOGLE_AUTH_TRUST_BOUNDARY_ENABLE_EXPERIMENT' ] ;
12851287 sandbox . restore ( ) ;
12861288 nock . cleanAll ( ) ;
12871289 } ) ;
@@ -1293,9 +1295,9 @@ describe('jwt', () => {
12931295 scopes : [ 'http://bar' , 'http://foo' ] ,
12941296 subject : 'bar@subjectaccount.com' ,
12951297 } ) ;
1296- jwt . credentials = { refresh_token : 'jwt-placeholder' } ;
1298+ jwt . credentials = { refresh_token : 'jwt-placeholder' } ;
12971299
1298- const tokenScope = createGTokenMock ( { access_token : MOCK_ACCESS_TOKEN } ) ;
1300+ const tokenScope = createGTokenMock ( { access_token : MOCK_ACCESS_TOKEN } ) ;
12991301
13001302 let rabLookupCalled = false ;
13011303 const rabScope = setupRegionalAccessBoundaryNock ( SERVICE_ACCOUNT_EMAIL ) ;
@@ -1335,7 +1337,7 @@ describe('jwt', () => {
13351337 email : SERVICE_ACCOUNT_EMAIL ,
13361338 key : keys . private ,
13371339 } ) ;
1338- jwt . credentials = { refresh_token : 'jwt-placeholder' } ;
1340+ jwt . credentials = { refresh_token : 'jwt-placeholder' } ;
13391341
13401342 const lookupUrl = SERVICE_ACCOUNT_LOOKUP_ENDPOINT . replace (
13411343 '{service_account_email}' ,
@@ -1379,13 +1381,13 @@ describe('jwt', () => {
13791381 const jwt = new JWT ( {
13801382 email : SERVICE_ACCOUNT_EMAIL ,
13811383 key : PEM_CONTENTS ,
1382- additionalClaims : { target_audience : 'some-audience' } ,
1384+ additionalClaims : { target_audience : 'some-audience' } ,
13831385 } ) ;
13841386
13851387 // Setup a RAB lookup mock that should NOT be hit
13861388 const rabScope = setupRegionalAccessBoundaryNock ( SERVICE_ACCOUNT_EMAIL ) ;
13871389
1388- const scope = createGTokenMock ( { id_token : 'id-token-abc' } ) ;
1390+ const scope = createGTokenMock ( { id_token : 'id-token-abc' } ) ;
13891391 const headers = await jwt . getRequestHeaders (
13901392 'https://pubsub.googleapis.com' ,
13911393 ) ;
0 commit comments