diff options
author | AlexSm <[email protected]> | 2024-06-18 12:04:19 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2024-06-18 12:04:19 +0200 |
commit | 6d15171aad7457bc7a3c9cc3efc681de669275b9 (patch) | |
tree | 6d88bb39f533ca7fc94ca3d75d163b94c6c7d073 | |
parent | d52533aeee6841e90a688ed1133ba5954d0ac534 (diff) |
Enable YC IAM auth in YDB OSS tests (#5663)
-rw-r--r-- | contrib/python/ydb/py3/ydb/iam/auth.py | 9 | ||||
-rw-r--r-- | ydb/tests/oss/ydb_sdk_import/ya.make | 1 |
2 files changed, 8 insertions, 2 deletions
diff --git a/contrib/python/ydb/py3/ydb/iam/auth.py b/contrib/python/ydb/py3/ydb/iam/auth.py index 7b4fa4e8d9e..dac9fb6c1c2 100644 --- a/contrib/python/ydb/py3/ydb/iam/auth.py +++ b/contrib/python/ydb/py3/ydb/iam/auth.py @@ -16,8 +16,13 @@ try: from yandex.cloud.iam.v1 import iam_token_service_pb2_grpc from yandex.cloud.iam.v1 import iam_token_service_pb2 except ImportError: - iam_token_service_pb2_grpc = None - iam_token_service_pb2 = None + try: + # This attempt is to enable the IAM auth inside the YDB repository on GitHub + from ydb.public.api.client.yc_public.iam import iam_token_service_pb2_grpc + from ydb.public.api.client.yc_public.iam import iam_token_service_pb2 + except ImportError: + iam_token_service_pb2_grpc = None + iam_token_service_pb2 = None try: import requests diff --git a/ydb/tests/oss/ydb_sdk_import/ya.make b/ydb/tests/oss/ydb_sdk_import/ya.make index 254ed371119..521b3867eba 100644 --- a/ydb/tests/oss/ydb_sdk_import/ya.make +++ b/ydb/tests/oss/ydb_sdk_import/ya.make @@ -13,6 +13,7 @@ ENDIF() PEERDIR( ydb/tests/oss/canonical + ydb/public/api/client/yc_public/iam ) END() |