feat: Introduce Environment Variable for Quota Project Id#1082
Merged
sai-sunder-s merged 23 commits intogoogleapis:mainfrom Nov 30, 2022
Merged
feat: Introduce Environment Variable for Quota Project Id#1082sai-sunder-s merged 23 commits intogoogleapis:mainfrom
sai-sunder-s merged 23 commits intogoogleapis:mainfrom
Conversation
TimurSadykov
suggested changes
Nov 8, 2022
8ccaed6 to
2cc31f7
Compare
TimurSadykov
suggested changes
Nov 17, 2022
6a0436f to
e390a30
Compare
a916df8 to
a7927c1
Compare
chingor13
reviewed
Nov 23, 2022
chingor13
requested changes
Nov 29, 2022
|
|
||
| @Test | ||
| public void adcQuotaFromEnv() throws IOException { | ||
| GoogleCredentials credentials = GoogleCredentials.getApplicationDefault(); |
Contributor
There was a problem hiding this comment.
I'm not a big fan of this test where the code does not control the success of this test.
Contributor
Author
There was a problem hiding this comment.
Removed. Moved this as an assert on env var to the other test
There was a problem hiding this comment.
Sorry, for a late comment. I think we better restore the original test. It is not perfect but it adds value by validating the quota project override behavior "in the wild".
The second test only checks that override does not work for explicit value, which is a different test case
chingor13
requested changes
Nov 30, 2022
chingor13
approved these changes
Nov 30, 2022
lsirac
approved these changes
Nov 30, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce a new environment variable "GOOGLE_CLOUD_QUOTA_PROJECT" that can be used to specify a quota project id. This quota project will be used to override the quota project from the credential detected during ADC generation.
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 #<issue_number_goes_here> ☕️
If you write sample code, please follow the samples format.