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(); });