-
Notifications
You must be signed in to change notification settings - Fork 382
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
fix: call addSharedMetadataHeaders even when token has not expired #1116
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
Codecov Report
@@ Coverage Diff @@
## master #1116 +/- ##
=======================================
Coverage 91.65% 91.65%
=======================================
Files 21 21
Lines 4157 4157
Branches 464 430 -34
=======================================
Hits 3810 3810
Misses 347 347
Continue to review full report at Codecov.
|
@googlebot I signed it! |
@hideto0710 good catch 👍 (CC: @sofisl). I understand, the problem was specifically when grabbing headers and happened prior to expiry 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mind adding the additional test? thank you very much for the contribution 🎉
@@ -152,4 +152,22 @@ describe('refresh', () => { | |||
assert.strictEqual(headers['x-goog-user-project'], 'my-quota-project'); | |||
req.done(); | |||
}); | |||
|
|||
it('getRequestHeaders should populate x-goog-user-project header if quota_project_id present and token has not expired', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should also add a test that makes sure you get the appropriate header populated after the expiry?
(sorry for the slow review, we'll work on getting this out the door quickly.).
@hideto0710 thank you very much for the contribution 👍 |
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #1114 🦕
before
after