Skip to content

Commit

Permalink
fix: change universe_domain to universe-domain (#1613)
Browse files Browse the repository at this point in the history
  • Loading branch information
TimurSadykov authored Oct 24, 2024
1 parent 10f42a7 commit 168fcc6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion google/auth/compute_engine/_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def get_universe_domain(request):
404 occurs while retrieving metadata.
"""
universe_domain = get(
request, "universe/universe_domain", return_none_for_not_found_error=True
request, "universe/universe-domain", return_none_for_not_found_error=True
)
if not universe_domain:
return "googleapis.com"
Expand Down
14 changes: 7 additions & 7 deletions tests/compute_engine/test__metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ def test_get_universe_domain_success():

request.assert_called_once_with(
method="GET",
url=_metadata._METADATA_ROOT + "universe/universe_domain",
url=_metadata._METADATA_ROOT + "universe/universe-domain",
headers=_metadata._METADATA_HEADERS,
)
assert universe_domain == "fake_universe_domain"
Expand All @@ -410,7 +410,7 @@ def test_get_universe_domain_success_empty_response():

request.assert_called_once_with(
method="GET",
url=_metadata._METADATA_ROOT + "universe/universe_domain",
url=_metadata._METADATA_ROOT + "universe/universe-domain",
headers=_metadata._METADATA_HEADERS,
)
assert universe_domain == "googleapis.com"
Expand All @@ -425,7 +425,7 @@ def test_get_universe_domain_not_found():

request.assert_called_once_with(
method="GET",
url=_metadata._METADATA_ROOT + "universe/universe_domain",
url=_metadata._METADATA_ROOT + "universe/universe-domain",
headers=_metadata._METADATA_HEADERS,
)
assert universe_domain == "googleapis.com"
Expand All @@ -445,7 +445,7 @@ def test_get_universe_domain_retryable_error_failure():

request.assert_called_with(
method="GET",
url=_metadata._METADATA_ROOT + "universe/universe_domain",
url=_metadata._METADATA_ROOT + "universe/universe-domain",
headers=_metadata._METADATA_HEADERS,
)
assert request.call_count == 5
Expand Down Expand Up @@ -487,12 +487,12 @@ def request(self, *args, **kwargs):

request_error.assert_called_once_with(
method="GET",
url=_metadata._METADATA_ROOT + "universe/universe_domain",
url=_metadata._METADATA_ROOT + "universe/universe-domain",
headers=_metadata._METADATA_HEADERS,
)
request_ok.assert_called_once_with(
method="GET",
url=_metadata._METADATA_ROOT + "universe/universe_domain",
url=_metadata._METADATA_ROOT + "universe/universe-domain",
headers=_metadata._METADATA_HEADERS,
)

Expand All @@ -511,7 +511,7 @@ def test_get_universe_domain_other_error():

request.assert_called_once_with(
method="GET",
url=_metadata._METADATA_ROOT + "universe/universe_domain",
url=_metadata._METADATA_ROOT + "universe/universe-domain",
headers=_metadata._METADATA_HEADERS,
)

Expand Down
4 changes: 2 additions & 2 deletions tests/compute_engine/test_credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ def test_with_target_audience_integration(self):
responses.add(
responses.GET,
"http://metadata.google.internal/computeMetadata/v1/universe/"
"universe_domain",
"universe-domain",
status=200,
content_type="application/json",
json={},
Expand Down Expand Up @@ -673,7 +673,7 @@ def test_with_quota_project_integration(self):
responses.add(
responses.GET,
"http://metadata.google.internal/computeMetadata/v1/universe/"
"universe_domain",
"universe-domain",
status=200,
content_type="application/json",
json={},
Expand Down

0 comments on commit 168fcc6

Please sign in to comment.