aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/google-auth/py3/tests/test_aws.py
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2024-06-21 09:28:26 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2024-06-21 09:36:40 +0300
commit0cb3f820fac6a243bcb7e4c4388700898660bfd0 (patch)
tree056f1b8bc5f72039fa422aac0af13bab0e966aa7 /contrib/python/google-auth/py3/tests/test_aws.py
parent08049311fe5c42a97e8bb47a73fb6cd143c0bdb1 (diff)
downloadydb-0cb3f820fac6a243bcb7e4c4388700898660bfd0.tar.gz
Intermediate changes
Diffstat (limited to 'contrib/python/google-auth/py3/tests/test_aws.py')
-rw-r--r--contrib/python/google-auth/py3/tests/test_aws.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/contrib/python/google-auth/py3/tests/test_aws.py b/contrib/python/google-auth/py3/tests/test_aws.py
index 5614820312..df1f02e7d7 100644
--- a/contrib/python/google-auth/py3/tests/test_aws.py
+++ b/contrib/python/google-auth/py3/tests/test_aws.py
@@ -1220,6 +1220,39 @@ class TestCredentials(object):
url + SERVICE_ACCOUNT_IMPERSONATION_URL_ROUTE
)
+ def test_info_with_default_token_url(self):
+ credentials = aws.Credentials(
+ audience=AUDIENCE,
+ subject_token_type=SUBJECT_TOKEN_TYPE,
+ credential_source=self.CREDENTIAL_SOURCE.copy(),
+ )
+
+ assert credentials.info == {
+ "type": "external_account",
+ "audience": AUDIENCE,
+ "subject_token_type": SUBJECT_TOKEN_TYPE,
+ "token_url": TOKEN_URL,
+ "credential_source": self.CREDENTIAL_SOURCE.copy(),
+ "universe_domain": DEFAULT_UNIVERSE_DOMAIN,
+ }
+
+ def test_info_with_default_token_url_with_universe_domain(self):
+ credentials = aws.Credentials(
+ audience=AUDIENCE,
+ subject_token_type=SUBJECT_TOKEN_TYPE,
+ credential_source=self.CREDENTIAL_SOURCE.copy(),
+ universe_domain="testdomain.org",
+ )
+
+ assert credentials.info == {
+ "type": "external_account",
+ "audience": AUDIENCE,
+ "subject_token_type": SUBJECT_TOKEN_TYPE,
+ "token_url": "https://sts.testdomain.org/v1/token",
+ "credential_source": self.CREDENTIAL_SOURCE.copy(),
+ "universe_domain": "testdomain.org",
+ }
+
def test_retrieve_subject_token_missing_region_url(self):
# When AWS_REGION envvar is not available, region_url is required for
# determining the current AWS region.