Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update token endpoint + fix failing tests #269

Merged
merged 4 commits into from
Jan 30, 2018
Merged

Update token endpoint + fix failing tests #269

merged 4 commits into from
Jan 30, 2018

Conversation

ace-n
Copy link
Contributor

@ace-n ace-n commented Jan 30, 2018

When I try to use this library in an npm Container Builder step (via the Cloud Storage API), I get the following error:

{ Error: 404 page not found
at new RequestError (/workspace/functions/autodeploy/node_modules/google-auth-library/lib/transporters.js:34:42)
at Request._callback (/workspace/functions/autodeploy/node_modules/google-auth-library/lib/transporters.js:108:23)
at Request.self.callback (/workspace/functions/autodeploy/node_modules/request/request.js:186:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request.<anonymous> (/workspace/functions/autodeploy/node_modules/request/request.js:1163:10)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at IncomingMessage.<anonymous> (/workspace/functions/autodeploy/node_modules/request/request.js:1085:12)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1056:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9) code: 404 }

To (potentially) fix this, I've changed the v1beta1 token endpoint URL to use v1, which in my tests returned a token (as opposed to 404ing like the v1beta1 URL).

I've also updated the tests accordingly, and added timeouts to a few unrelated-but-flaky tests to ensure that they pass.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jan 30, 2018
@codecov-io
Copy link

codecov-io commented Jan 30, 2018

Codecov Report

Merging #269 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #269   +/-   ##
=======================================
  Coverage   93.91%   93.91%           
=======================================
  Files          13       13           
  Lines         838      838           
  Branches      182      182           
=======================================
  Hits          787      787           
  Misses         51       51
Impacted Files Coverage Δ
src/auth/computeclient.ts 94.73% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7d89b2c...85cab34. Read the comment docs.

@@ -1113,7 +1113,9 @@ describe('GoogleAuth', () => {

describe('.getApplicationDefault', () => {
it('should return a new credential the first time and a cached credential the second time',
async () => {
async function() {

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants