-
Notifications
You must be signed in to change notification settings - Fork 311
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: revert templates for iam endpoints (#1614)
* fix: revert templates for iam endpoints * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * tests update --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
- Loading branch information
1 parent
168fcc6
commit 0a4363a
Showing
4 changed files
with
23 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -798,7 +798,6 @@ def test_refresh_iam_flow(self, call_iam_generate_id_token_endpoint): | |
assert target_audience == "https://example.com" | ||
decoded_access_token = jwt.decode(access_token, verify=False) | ||
assert decoded_access_token["scope"] == "https://www.googleapis.com/auth/iam" | ||
assert universe_domain == "googleapis.com" | ||
|
||
@mock.patch( | ||
"google.oauth2._client.call_iam_generate_id_token_endpoint", autospec=True | ||
|
@@ -818,13 +817,12 @@ def test_refresh_iam_flow_non_gdu(self, call_iam_generate_id_token_endpoint): | |
assert req == request | ||
assert ( | ||
iam_endpoint | ||
== "https://iamcredentials.{}/v1/projects/-/serviceAccounts/{}:generateIdToken" | ||
== "https://iamcredentials.fake-universe/v1/projects/-/serviceAccounts/{}:generateIdToken" | ||
) | ||
assert signer_email == "[email protected]" | ||
assert target_audience == "https://example.com" | ||
decoded_access_token = jwt.decode(access_token, verify=False) | ||
assert decoded_access_token["scope"] == "https://www.googleapis.com/auth/iam" | ||
assert universe_domain == "fake-universe" | ||
|
||
@mock.patch("google.oauth2._client.id_token_jwt_grant", autospec=True) | ||
def test_before_request_refreshes(self, id_token_jwt_grant): | ||
|