From 89e16c2401101d086a8f9d05b8f0771b5c74157c Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Wed, 6 May 2020 18:39:14 -0700 Subject: [PATCH] fix: gcp-metadata now warns rather than throwing (#956) --- package.json | 2 +- test/test.googleauth.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index ae77496f..817006e6 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "ecdsa-sig-formatter": "^1.0.11", "fast-text-encoding": "^1.0.0", "gaxios": "^3.0.0", - "gcp-metadata": "^4.0.0", + "gcp-metadata": "^4.1.0", "gtoken": "^5.0.0", "jws": "^4.0.0", "lru-cache": "^5.0.0" diff --git a/test/test.googleauth.ts b/test/test.googleauth.ts index c0a745dd..1d894032 100644 --- a/test/test.googleauth.ts +++ b/test/test.googleauth.ts @@ -1045,11 +1045,11 @@ describe('googleauth', () => { scopes.forEach(s => s.done()); }); - it('_checkIsGCE should throw on unexpected errors', async () => { + it('_checkIsGCE should return false on unexpected errors', async () => { assert.notStrictEqual(true, auth.isGCE); const scope = nock500GCE(); - await assert.rejects(auth._checkIsGCE()); - assert.strictEqual(undefined, auth.isGCE); + assert.strictEqual(await auth._checkIsGCE(), false); + assert.strictEqual(auth.isGCE, false); scope.done(); });