Skip to content

impl(gax-internal): add universe_domain mod helper #5243

Open
alvarowolfx wants to merge 2 commits intogoogleapis:mainfrom
alvarowolfx:impl-gax-internal-universe-domain-mod
Open

impl(gax-internal): add universe_domain mod helper #5243
alvarowolfx wants to merge 2 commits intogoogleapis:mainfrom
alvarowolfx:impl-gax-internal-universe-domain-mod

Conversation

@alvarowolfx
Copy link
Copy Markdown
Collaborator

Towards #3646

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

❌ Patch coverage is 98.11321% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 98.02%. Comparing base (93eebe7) to head (e962d0d).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/gax-internal/src/universe_domain.rs 98.11% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alvarowolfx alvarowolfx marked this pull request as ready for review April 2, 2026 15:10
@alvarowolfx alvarowolfx requested a review from a team as a code owner April 2, 2026 15:10
Copy link
Copy Markdown
Member

@dbolduc dbolduc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ 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);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants