Skip to content

Commit

Permalink
VIEW: export, import tests (#13979)
Browse files Browse the repository at this point in the history
  • Loading branch information
jepett0 authored Jan 30, 2025
1 parent 230082b commit 1298f3b
Show file tree
Hide file tree
Showing 3 changed files with 311 additions and 5 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 @@ -392,12 +392,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 1298f3b

Please sign in to comment.