impl(gax-internal): add universe_domain mod helper #5243
impl(gax-internal): add universe_domain mod helper #5243alvarowolfx wants to merge 2 commits intogoogleapis:mainfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5243 +/- ##
==========================================
- Coverage 98.02% 98.02% -0.01%
==========================================
Files 214 215 +1
Lines 44645 44698 +53
==========================================
+ Hits 43764 43815 +51
- Misses 881 883 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
dbolduc
left a comment
There was a problem hiding this comment.
I think you should split the test. And then I had a question on what behavior we want for one of the cases.
|
|
||
| let universe_domain = resolve(client_override, &cred).await; | ||
| let expected = expected.map(|s| s.to_string()); | ||
| match (universe_domain, expected) { |
There was a problem hiding this comment.
It will be cleaner to split this into two tests: one with all the success cases, and one with all the error cases.
|
|
||
| let cred_universe = cred_universe.as_deref().unwrap_or(DEFAULT_UNIVERSE_DOMAIN); | ||
|
|
||
| if universe_domain != cred_universe { |
There was a problem hiding this comment.
There was a problem hiding this comment.
^ Note that this succeeds if the creds have no universe and the client has a non-GDU universe.
| .unwrap_or(DEFAULT_UNIVERSE_DOMAIN) | ||
| .to_string(); | ||
|
|
||
| let cred_universe = cred_universe.as_deref().unwrap_or(DEFAULT_UNIVERSE_DOMAIN); |
There was a problem hiding this comment.
So if my creds have no universe, and my client has a non-GDU universe, that is a fail. Should it be?
(There is not a test case for this)
Towards #3646