Skip to content

Commit

Permalink
fix: gcp-metadata now warns rather than throwing (#956)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoe committed May 7, 2020
1 parent 0795540 commit 89e16c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions test/test.googleauth.ts
Expand Up @@ -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();
});

Expand Down

0 comments on commit 89e16c2

Please sign in to comment.