From 40c847fcc4a3fa32b7f016599f8c43f9a7cbc686 Mon Sep 17 00:00:00 2001 From: Daniel Bankhead Date: Mon, 26 Feb 2024 13:11:48 -0800 Subject: [PATCH] test: Log Error On Error (#1760) * test: Log Error On Error * chore: type fix * refactor: revert accidental changes from another branch --- samples/test/externalclient.test.js | 8 ++++---- src/auth/oauth2client.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/samples/test/externalclient.test.js b/samples/test/externalclient.test.js index b3e231c3..6f128529 100644 --- a/samples/test/externalclient.test.js +++ b/samples/test/externalclient.test.js @@ -290,7 +290,7 @@ describe('samples for external-account', () => { }, }); // Confirm expected script output. - assert.match(output, /DNS Info:/); + assert.match(output, /DNS Info:/, output); }); it('should sign the blobs with IAM credentials API', async () => { @@ -389,7 +389,7 @@ describe('samples for external-account', () => { }, }); // Confirm expected script output. - assert.match(output, /DNS Info:/); + assert.match(output, /DNS Info:/, output); }); it('should acquire ADC for AWS creds', async () => { @@ -427,7 +427,7 @@ describe('samples for external-account', () => { }, }); // Confirm expected script output. - assert.match(output, /DNS Info:/); + assert.match(output, /DNS Info:/, output); }); it('should acquire ADC for PluggableAuth creds', async () => { @@ -474,7 +474,7 @@ describe('samples for external-account', () => { }, }); // Confirm expected script output. - assert.match(output, /DNS Info:/); + assert.match(output, /DNS Info:/, output); }); it('should acquire access token with service account impersonation options', async () => { diff --git a/src/auth/oauth2client.ts b/src/auth/oauth2client.ts index e5a94c31..c9f87d56 100644 --- a/src/auth/oauth2client.ts +++ b/src/auth/oauth2client.ts @@ -854,7 +854,7 @@ export class OAuth2Client extends AuthClient { protected async getRequestMetadataAsync( // eslint-disable-next-line @typescript-eslint/no-unused-vars - url?: string | null + url?: string | URL | null ): Promise { const thisCreds = this.credentials; if (