aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp
diff options
context:
space:
mode:
authorMaxim Yurchuk <maxim-yurchuk@ydb.tech>2024-12-13 10:22:13 +0000
committerGitHub <noreply@github.com>2024-12-13 10:22:13 +0000
commite73e490feb4e1f63d097697324aa48b643a62317 (patch)
treef63fe3d15819a5148ade51609c5211251d93e425 /library/cpp
parent19346460a8060a0ed4731edb192745642ff34b3d (diff)
parent4dde77404d1eae4a633d1cc3807142409a9938eb (diff)
downloadydb-e73e490feb4e1f63d097697324aa48b643a62317.tar.gz
Merge pull request #12582 from vitalyisaev2/rightlib_20241212
Merge rightlib 20241212
Diffstat (limited to 'library/cpp')
-rw-r--r--library/cpp/testing/common/env.cpp26
-rw-r--r--library/cpp/testing/common/ut/env_ut.cpp18
2 files changed, 1 insertions, 43 deletions
diff --git a/library/cpp/testing/common/env.cpp b/library/cpp/testing/common/env.cpp
index 67e081c371c..1440186d789 100644
--- a/library/cpp/testing/common/env.cpp
+++ b/library/cpp/testing/common/env.cpp
@@ -41,31 +41,7 @@ TString BinaryPath(TStringBuf path) {
}
TString GetArcadiaTestsData() {
- if (GetEnv("USE_ATD_FROM_SNAPSHOT")) {
- return ArcadiaSourceRoot() + "/atd_ro_snapshot";
- }
-
- TString atdRoot = NPrivate::GetTestEnv().ArcadiaTestsDataDir;
- if (atdRoot) {
- return atdRoot;
- }
-
- TString path = NPrivate::GetCwd();
- const char pathsep = GetDirectorySeparator();
- while (!path.empty()) {
- TString dataDir = path + "/arcadia_tests_data";
- if (IsDir(dataDir)) {
- return dataDir;
- }
-
- size_t pos = path.find_last_of(pathsep);
- if (pos == TString::npos) {
- pos = 0;
- }
- path.erase(pos);
- }
-
- return {};
+ return ArcadiaSourceRoot() + "/atd_ro_snapshot";
}
TString GetWorkPath() {
diff --git a/library/cpp/testing/common/ut/env_ut.cpp b/library/cpp/testing/common/ut/env_ut.cpp
index fe4946a65f3..4b67d05efb4 100644
--- a/library/cpp/testing/common/ut/env_ut.cpp
+++ b/library/cpp/testing/common/ut/env_ut.cpp
@@ -45,24 +45,6 @@ TEST(Runtime, BinaryPath) {
EXPECT_TRUE(TFsPath(BinaryPath("library/cpp/testing/common/ut")).Exists());
}
-TEST(Runtime, GetArcadiaTestsData) {
- NTesting::TScopedEnvironment contextGuard("YA_TEST_CONTEXT_FILE", ""); // remove context filename
- {
- auto tmpDir = ::GetSystemTempDir();
- NTesting::TScopedEnvironment guard("ARCADIA_TESTS_DATA_DIR", tmpDir);
- Singleton<NPrivate::TTestEnv>()->ReInitialize();
- EXPECT_EQ(tmpDir, GetArcadiaTestsData());
- }
- {
- NTesting::TScopedEnvironment guard("ARCADIA_TESTS_DATA_DIR", "");
- Singleton<NPrivate::TTestEnv>()->ReInitialize();
- auto path = GetArcadiaTestsData();
- // it is not error if path is empty
- const bool ok = (path.empty() || GetBaseName(path) == "arcadia_tests_data");
- EXPECT_TRUE(ok);
- }
-}
-
TEST(Runtime, GetWorkPath) {
NTesting::TScopedEnvironment contextGuard("YA_TEST_CONTEXT_FILE", ""); // remove context filename
{