1+ #include " backup_test_base.h"
2+
13#include < ydb/services/ydb/ydb_common_ut.h>
24
35#include < ydb/public/sdk/cpp/include/ydb-cpp-sdk/client/driver/driver.h>
@@ -68,25 +70,11 @@ class TFsBackupParamsValidationTestFixture : public NUnitTest::TBaseFixture {
6870 return *Driver;
6971 }
7072
71- #define YDB_SDK_CLIENT (type, funcName ) \
72- protected: \
73- TMaybe<type> Y_CAT (funcName, Instance); \
74- public: \
75- type& funcName () { \
76- if (!Y_CAT (funcName, Instance)) { \
77- Y_CAT (funcName, Instance).ConstructInPlace (YdbDriver ()); \
78- } \
79- return *Y_CAT (funcName, Instance); \
80- } \
81- /* */
82-
8373 YDB_SDK_CLIENT (NYdb::NExport::TExportClient, YdbExportClient);
8474 YDB_SDK_CLIENT (NYdb::NImport::TImportClient, YdbImportClient);
8575 YDB_SDK_CLIENT (NYdb::NQuery::TQueryClient, YdbQueryClient);
8676 YDB_SDK_CLIENT (NYdb::NOperation::TOperationClient, YdbOperationClient);
8777
88- #undef YDB_SDK_CLIENT
89-
9078 template <class TResponseType >
9179 void WaitOpSuccess (const TResponseType& res, const TString& comments = {},
9280 TDuration timeout = DEFAULT_OPERATION_WAIT_TIME) {
@@ -159,14 +147,6 @@ Y_UNIT_TEST_SUITE_F(FsBackupParamsValidationTest, TFsBackupParamsValidationTestF
159147 res.Status ().GetIssues ().ToString ());
160148 UNIT_ASSERT_STRING_CONTAINS_C (res.Status ().GetIssues ().ToString (), " base_path is required but not set" ,
161149 res.Status ().GetIssues ().ToString ());
162-
163- // Fix: provide base_path
164- {
165- // NExport::TExportToFsSettings fixSettings = settings;
166- // fixSettings.BasePath(TString(TempDir().Path()));
167- // auto res = YdbExportClient().ExportToFs(fixSettings).GetValueSync();
168- // WaitOpSuccess(res, "Export with base_path should succeed");
169- }
170150 }
171151
172152 Y_UNIT_TEST (RelativeBasePath) {
@@ -182,6 +162,7 @@ Y_UNIT_TEST_SUITE_F(FsBackupParamsValidationTest, TFsBackupParamsValidationTestF
182162 UNIT_ASSERT_STRING_CONTAINS_C (res.Status ().GetIssues ().ToString (), " base_path must be an absolute path" ,
183163 res.Status ().GetIssues ().ToString ());
184164
165+ // TODO(st-shchetinin): Uncomment after supporting the entire export pipeline in NFS
185166 // Fix: use absolute path
186167 {
187168 // NExport::TExportToFsSettings fixSettings = settings;
@@ -204,6 +185,7 @@ Y_UNIT_TEST_SUITE_F(FsBackupParamsValidationTest, TFsBackupParamsValidationTestF
204185 UNIT_ASSERT_STRING_CONTAINS_C (res.Status ().GetIssues ().ToString (), " Unsupported compression codec" ,
205186 res.Status ().GetIssues ().ToString ());
206187
188+ // TODO(st-shchetinin): Uncomment after supporting the entire export pipeline in NFS
207189 // Fix: use valid codec
208190 {
209191 // NExport::TExportToFsSettings fixSettings = settings;
@@ -241,6 +223,7 @@ Y_UNIT_TEST_SUITE_F(FsBackupParamsValidationTest, TFsBackupParamsValidationTestF
241223 UNIT_ASSERT_VALUES_EQUAL_C (res.Status ().GetStatus (), NYdb::EStatus::BAD_REQUEST,
242224 res.Status ().GetIssues ().ToString ());
243225
226+ // TODO(st-shchetinin): Uncomment after supporting the entire export pipeline in NFS
244227 // Fix: valid level
245228 {
246229 // NExport::TExportToFsSettings fixSettings = settings;
@@ -286,6 +269,15 @@ Y_UNIT_TEST_SUITE_F(FsImportParamsValidationTest, TFsBackupParamsValidationTestF
286269 res.Status ().GetIssues ().ToString ());
287270 UNIT_ASSERT_STRING_CONTAINS_C (res.Status ().GetIssues ().ToString (), " base_path must be an absolute path" ,
288271 res.Status ().GetIssues ().ToString ());
272+
273+ // TODO(st-shchetinin): Uncomment after supporting the entire export pipeline in NFS
274+ // Fix: use absolute path
275+ {
276+ // NImport::TImportFromFsSettings fixSettings = settings;
277+ // fixSettings.BasePath(TString(TempDir().Path()));
278+ // auto res = YdbImportClient().ImportFromFs(fixSettings).GetValueSync();
279+ // WaitOpSuccess(res, "Import with absolute base_path should succeed");
280+ }
289281 }
290282
291283 Y_UNIT_TEST (EmptyImportItem) {
0 commit comments