diff options
author | Dmitry Kardymon <[email protected]> | 2025-07-10 15:58:50 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2025-07-10 15:58:50 +0300 |
commit | 9f6d559183eb9fb02d78c58ea6bb61179c9a025e (patch) | |
tree | d171bf6771123678e5ea36d5eca24b5f6ed7af29 | |
parent | 517d65bc7942b830f2b9808f233913582464ef81 (diff) |
YQ-3341 Add external_sources_access_sid to tests (#18631)
-rw-r--r-- | ydb/core/fq/libs/compute/common/config.h | 7 | ||||
-rw-r--r-- | ydb/core/fq/libs/config/protos/compute.proto | 1 | ||||
-rw-r--r-- | ydb/tests/fq/generic/analytics/test_clickhouse.py | 6 | ||||
-rw-r--r-- | ydb/tests/tools/fq_runner/kikimr_utils.py | 3 |
4 files changed, 13 insertions, 4 deletions
diff --git a/ydb/core/fq/libs/compute/common/config.h b/ydb/core/fq/libs/compute/common/config.h index ae7bb0ec60f..ad1c4e19bcc 100644 --- a/ydb/core/fq/libs/compute/common/config.h +++ b/ydb/core/fq/libs/compute/common/config.h @@ -74,7 +74,10 @@ public: case NConfig::TYdbComputeControlPlane::TYPE_NOT_SET: return {}; case NConfig::TYdbComputeControlPlane::kSingle: - return {}; + { + const auto& ids = controlPlane.GetSingle().GetAccessConfig().GetExternalSourcesAccessSID(); + return TVector<TString>{ids.begin(), ids.end()}; + } case NConfig::TYdbComputeControlPlane::kCms: return GetExternalSourcesAccessSIDs(scope, controlPlane.GetCms().GetDatabaseMapping()); case NConfig::TYdbComputeControlPlane::kYdbcp: @@ -83,7 +86,7 @@ public: } TVector<TString> GetExternalSourcesAccessSIDs(const TString& scope, const ::NFq::NConfig::TDatabaseMapping& databaseMapping) const { - const auto protoExternalSourcesAccessSIDs = GetComputeDatabaseConfig(scope, databaseMapping).GetAccessConfig().GetExternalSourcesAccessSID(); + const auto& protoExternalSourcesAccessSIDs = GetComputeDatabaseConfig(scope, databaseMapping).GetAccessConfig().GetExternalSourcesAccessSID(); return TVector<TString>{protoExternalSourcesAccessSIDs.begin(), protoExternalSourcesAccessSIDs.end()}; } diff --git a/ydb/core/fq/libs/config/protos/compute.proto b/ydb/core/fq/libs/config/protos/compute.proto index e6bfcf08e02..97af67febcd 100644 --- a/ydb/core/fq/libs/config/protos/compute.proto +++ b/ydb/core/fq/libs/config/protos/compute.proto @@ -68,6 +68,7 @@ message TYdbComputeControlPlane { string Id = 3; TYdbStorageConfig Connection = 1; TWorkloadManagerConfig WorkloadManagerConfig = 2; + TAccessConfig AccessConfig = 4; } message TCms { diff --git a/ydb/tests/fq/generic/analytics/test_clickhouse.py b/ydb/tests/fq/generic/analytics/test_clickhouse.py index 08914b49dec..7557329b554 100644 --- a/ydb/tests/fq/generic/analytics/test_clickhouse.py +++ b/ydb/tests/fq/generic/analytics/test_clickhouse.py @@ -17,13 +17,13 @@ class TestClickHouse: conn_name = f'conn_{table_name}' query_name = f'query_{table_name}' - fq_client.create_clickhouse_connection( + connection_id = fq_client.create_clickhouse_connection( name=conn_name, database_name=settings.clickhouse.dbname, database_id='clickhouse_cluster_id', login=settings.clickhouse.username, password=settings.clickhouse.password, - ) + ).result.connection_id sql = fR''' SELECT * @@ -43,3 +43,5 @@ class TestClickHouse: assert result_set.rows[0].items[0].int32_value == 1 assert result_set.rows[1].items[0].int32_value == 2 assert result_set.rows[2].items[0].int32_value == 3 + + fq_client.delete_connection(connection_id) diff --git a/ydb/tests/tools/fq_runner/kikimr_utils.py b/ydb/tests/tools/fq_runner/kikimr_utils.py index 87de49d63a9..e3fb81f8e3d 100644 --- a/ydb/tests/tools/fq_runner/kikimr_utils.py +++ b/ydb/tests/tools/fq_runner/kikimr_utils.py @@ -194,6 +194,9 @@ class YQv2Extension(ExtensionPoint): 'connection': { 'endpoint': kikimr.tenants["/compute"].endpoint(), 'database': '/local' + }, + 'access_config': { + 'external_sources_access_sid' : ['account@as'] } } } |