Skip to content

Commit 4e4f536

Browse files
committed
Address copilot review comments
1 parent c6a1f20 commit 4e4f536

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

ydb/tests/library/fixtures/__init__.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import contextlib
33
import logging
44
import os
5+
import copy
56

67
import pytest
78

@@ -171,17 +172,13 @@ def stop_pool():
171172

172173
@pytest.fixture(scope='module', params=[True, False], ids=["encryption_enabled", "encryption_disabled"])
173174
def encryption_enabled(request):
174-
"""
175-
Parametrized fixture that runs tests with both encryption enabled and disabled.
176-
"""
175+
"""Parametrized fixture that runs tests with both encryption enabled and disabled."""
177176
return request.param
178177

179178

180179
@pytest.fixture(scope='module')
181180
def ydb_cluster_configuration_with_encryption_parametrized(ydb_cluster_configuration, encryption_enabled):
182-
"""
183-
Extended cluster configuration that includes encryption settings based on the parametrized fixture.
184-
"""
185-
config = ydb_cluster_configuration.copy()
181+
"""Extended cluster configuration that includes encryption settings based on the parametrized fixture."""
182+
config = copy.deepcopy(ydb_cluster_configuration)
186183
config['enable_pool_encryption'] = encryption_enabled
187184
return config

ydb/tests/library/harness/kikimr_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ def grpc_tls_ca(self):
686686
@property
687687
def domains_txt(self):
688688
app_config = config_pb2.TAppConfig()
689-
assert not self.enable_pool_encryption, "pool encryption isn't addressed in domains.txt"
689+
assert not self.enable_pool_encryption, "pool encryption is not addressed in domains.txt"
690690
Parse(read_binary(__name__, "resources/default_domains.txt"), app_config.DomainsConfig)
691691
return app_config.DomainsConfig
692692

ydb/tests/library/harness/kikimr_runner.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,9 @@ def __register_slot(self, tenant_affiliation=None, encryption_key=None, seed_nod
642642
else self.nodes[1].grpc_port
643643
)
644644

645+
if tenant_affiliation is None:
646+
tenant_affiliation = "dynamic"
647+
645648
if encryption_key is None and self.__configurator.enable_pool_encryption:
646649
workdir = os.path.join(self.__configurator.working_dir, self.__cluster_name)
647650
slug = tenant_affiliation.replace('/', '_')
@@ -662,7 +665,7 @@ def __register_slot(self, tenant_affiliation=None, encryption_key=None, seed_nod
662665
udfs_dir=self.__common_udfs_dir,
663666
role='slot',
664667
node_broker_port=node_broker_port,
665-
tenant_affiliation=tenant_affiliation if tenant_affiliation is not None else 'dynamic',
668+
tenant_affiliation=tenant_affiliation,
666669
encryption_key=encryption_key,
667670
binary_path=self.__configurator.get_binary_path(slot_index),
668671
seed_nodes_file=seed_nodes_file,

0 commit comments

Comments
 (0)