Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jepett0 committed Jan 21, 2025
1 parent c5bff86 commit 6c9d712
Show file tree
Hide file tree
Showing 3 changed files with 292 additions and 6 deletions.
2 changes: 2 additions & 0 deletions ydb/core/testlib/test_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <ydb/services/fq/private_grpc.h>
#include <ydb/services/cms/grpc_service.h>
#include <ydb/services/datastreams/grpc_service.h>
#include <ydb/services/view/grpc_service.h>
#include <ydb/services/ymq/grpc_service.h>
#include <ydb/services/kesus/grpc_service.h>
#include <ydb/core/grpc_services/grpc_mon.h>
Expand Down Expand Up @@ -719,6 +720,7 @@ namespace Tests {
GRpcServer->AddService(new NGRpcService::TGRpcYdbLogStoreService(system, counters, grpcRequestProxies[0], true));
GRpcServer->AddService(new NGRpcService::TGRpcAuthService(system, counters, grpcRequestProxies[0], true));
GRpcServer->AddService(new NGRpcService::TGRpcReplicationService(system, counters, grpcRequestProxies[0], true));
GRpcServer->AddService(new NGRpcService::TGRpcViewService(system, counters, grpcRequestProxies[0], true));
GRpcServer->Start();
}

Expand Down
7 changes: 4 additions & 3 deletions ydb/public/lib/ydb_cli/dump/restore_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -390,12 +390,13 @@ TRestoreResult TRestoreClient::RestoreFolder(const TFsPath& fsPath, const TStrin
}
}

if (!result.Defined() && !IsDatabase(SchemeClient, dbPath)) {
const bool dbPathExists = oldEntries.contains(dbPath);
if (!result.Defined() && !dbPathExists) {
// This situation occurs when all the children of the folder are views.
return RestoreEmptyDir(fsPath, dbPath, settings, oldEntries.contains(dbPath));
return RestoreEmptyDir(fsPath, dbPath, settings, dbPathExists);
}

return RestorePermissions(fsPath, dbPath, settings, oldEntries.contains(dbPath));
return RestorePermissions(fsPath, dbPath, settings, dbPathExists);
}

TRestoreResult TRestoreClient::RestoreView(
Expand Down
Loading

0 comments on commit 6c9d712

Please sign in to comment.