Skip to content

Commit

Permalink
Set UseBuiltinDomain in true by default for unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
molotkov-and committed Jan 25, 2024
1 parent 902ac5e commit cf795c4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
2 changes: 2 additions & 0 deletions ydb/core/kqp/ut/common/kqp_ut_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ TKikimrRunner::TKikimrRunner(const TKikimrSettings& settings) {

NKikimrConfig::TAppConfig appConfig = settings.AppConfig;
appConfig.MutableColumnShardConfig()->SetDisabledOnSchemeShard(false);
ServerSettings->AuthConfig = appConfig.GetAuthConfig();
ServerSettings->AuthConfig.SetUseBuiltinDomain(true);
ServerSettings->SetAppConfig(appConfig);
ServerSettings->SetFeatureFlags(settings.FeatureFlags);
ServerSettings->SetNodeCount(settings.NodeCount);
Expand Down
9 changes: 5 additions & 4 deletions ydb/core/testlib/test_pq_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const static ui32 PQ_DEFAULT_NODE_COUNT = 2;
inline Tests::TServerSettings PQSettings(ui16 port = 0, ui32 nodesCount = PQ_DEFAULT_NODE_COUNT, const TString& yql_timeout = "10", const THolder<TTempFileHandle>& netDataFile = nullptr) {
NKikimrPQ::TPQConfig pqConfig;
NKikimrProto::TAuthConfig authConfig;
authConfig.SetUseBuiltinDomain(true);
authConfig.SetUseBlackBox(false);
authConfig.SetUseAccessService(false);
authConfig.SetUseAccessServiceTLS(false);
Expand Down Expand Up @@ -542,7 +543,7 @@ class TFlatMsgBusPQClient : public NFlatTests::TFlatMsgBusClient {
auto driverConfig = NYdb::TDriverConfig()
.SetEndpoint(endpoint)
.SetLog(CreateLogBackend("cerr", ELogPriority::TLOG_DEBUG));
if (databaseName)
if (databaseName)
driverConfig.SetDatabase(*databaseName);
Driver.Reset(MakeHolder<NYdb::TDriver>(driverConfig));

Expand Down Expand Up @@ -790,7 +791,7 @@ class TFlatMsgBusPQClient : public NFlatTests::TFlatMsgBusClient {
{
auto response = RequestTopicMetadata(name);

if (response.GetErrorCode() != (ui32)NPersQueue::NErrorCode::OK)
if (response.GetErrorCode() != (ui32)NPersQueue::NErrorCode::OK)
return 0;

UNIT_ASSERT(response.HasMetaResponse());
Expand Down Expand Up @@ -1080,7 +1081,7 @@ class TFlatMsgBusPQClient : public NFlatTests::TFlatMsgBusClient {
Cerr << "ChooseProxy response:\n" << PrintToString(response) << Endl;

UNIT_ASSERT_C(status.ok(), status.error_message());

UNIT_ASSERT_VALUES_EQUAL_C((NMsgBusProxy::EResponseStatus)response.GetStatus(), NMsgBusProxy::MSTATUS_OK, "proxy failure");
}

Expand All @@ -1095,7 +1096,7 @@ class TFlatMsgBusPQClient : public NFlatTests::TFlatMsgBusClient {
TString cookie = GetOwnership({writeRequest.Topic, writeRequest.Partition}, expectedOwnerStatus);

THolder<NMsgBusProxy::TBusPersQueue> request = writeRequest.GetRequest(data, cookie);
if (!ticket.empty())
if (!ticket.empty())
request.Get()->Record.SetTicket(ticket);

auto response = CallPersQueueGRPC(request->Record);
Expand Down
1 change: 1 addition & 0 deletions ydb/services/ydb/ydb_common_ut.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ class TBasicKikimrWithGrpcAndRootSchema {
}
ServerSettings->AppConfig->MergeFrom(appConfig);
ServerSettings->AuthConfig = appConfig.GetAuthConfig();
ServerSettings->AuthConfig.SetUseBuiltinDomain(true);
ServerSettings->FeatureFlags = appConfig.GetFeatureFlags();
ServerSettings->SetKqpSettings(kqpSettings);
ServerSettings->SetEnableDataColumnForIndexTable(true);
Expand Down
3 changes: 3 additions & 0 deletions ydb/tests/library/harness/kikimr_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,9 @@ def __init__(

if auth_config_path:
self.yaml_config["auth_config"] = _load_yaml_config(auth_config_path)
else:
self.yaml_config['auth_config'] = {}
self.yaml_config['auth_config']['use_builtin_domain'] = True

if fq_config_path:
self.yaml_config["federated_query_config"] = _load_yaml_config(fq_config_path)
Expand Down

0 comments on commit cf795c4

Please sign in to comment.