diff options
author | krock21 <krock21@yandex-team.ru> | 2022-02-10 16:46:02 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:02 +0300 |
commit | 937a6bb8d7c82d8d9d717f2bf6ce6c592a443641 (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /library/cpp/testing/common/ut/env_ut.cpp | |
parent | 4aae166b5d23fd02653919f43e2015cd636fa6fd (diff) | |
download | ydb-937a6bb8d7c82d8d9d717f2bf6ce6c592a443641.tar.gz |
Restoring authorship annotation for <krock21@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/testing/common/ut/env_ut.cpp')
-rw-r--r-- | library/cpp/testing/common/ut/env_ut.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/library/cpp/testing/common/ut/env_ut.cpp b/library/cpp/testing/common/ut/env_ut.cpp index 64a79bb411..2aed1e4a25 100644 --- a/library/cpp/testing/common/ut/env_ut.cpp +++ b/library/cpp/testing/common/ut/env_ut.cpp @@ -10,52 +10,52 @@ TEST(Runtime, ArcadiaSourceRoot) { - NTesting::TScopedEnvironment contextGuard("YA_TEST_CONTEXT_FILE", ""); // remove context filename + NTesting::TScopedEnvironment contextGuard("YA_TEST_CONTEXT_FILE", ""); // remove context filename { auto tmpDir = ::GetSystemTempDir(); NTesting::TScopedEnvironment guard("ARCADIA_SOURCE_ROOT", tmpDir); - Singleton<NPrivate::TTestEnv>()->ReInitialize(); + Singleton<NPrivate::TTestEnv>()->ReInitialize(); EXPECT_EQ(tmpDir, ArcadiaSourceRoot()); } { NTesting::TScopedEnvironment guard("ARCADIA_SOURCE_ROOT", ""); - Singleton<NPrivate::TTestEnv>()->ReInitialize(); + Singleton<NPrivate::TTestEnv>()->ReInitialize(); EXPECT_FALSE(ArcadiaSourceRoot().empty()); } } TEST(Runtime, BuildRoot) { - NTesting::TScopedEnvironment contextGuard("YA_TEST_CONTEXT_FILE", ""); // remove context filename + NTesting::TScopedEnvironment contextGuard("YA_TEST_CONTEXT_FILE", ""); // remove context filename { auto tmpDir = ::GetSystemTempDir(); NTesting::TScopedEnvironment guard("ARCADIA_BUILD_ROOT", tmpDir); - Singleton<NPrivate::TTestEnv>()->ReInitialize(); + Singleton<NPrivate::TTestEnv>()->ReInitialize(); EXPECT_EQ(tmpDir, BuildRoot()); } { NTesting::TScopedEnvironment guard("ARCADIA_BUILD_ROOT", ""); - Singleton<NPrivate::TTestEnv>()->ReInitialize(); + Singleton<NPrivate::TTestEnv>()->ReInitialize(); EXPECT_FALSE(BuildRoot().empty()); } } TEST(Runtime, BinaryPath) { - NTesting::TScopedEnvironment contextGuard("YA_TEST_CONTEXT_FILE", ""); // remove context filename - Singleton<NPrivate::TTestEnv>()->ReInitialize(); + NTesting::TScopedEnvironment contextGuard("YA_TEST_CONTEXT_FILE", ""); // remove context filename + Singleton<NPrivate::TTestEnv>()->ReInitialize(); EXPECT_TRUE(TFsPath(BinaryPath("library/cpp/testing/common/ut")).Exists()); } TEST(Runtime, GetArcadiaTestsData) { - NTesting::TScopedEnvironment contextGuard("YA_TEST_CONTEXT_FILE", ""); // remove context filename + 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(); + Singleton<NPrivate::TTestEnv>()->ReInitialize(); EXPECT_EQ(tmpDir, GetArcadiaTestsData()); } { NTesting::TScopedEnvironment guard("ARCADIA_TESTS_DATA_DIR", ""); - Singleton<NPrivate::TTestEnv>()->ReInitialize(); + 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"); @@ -64,39 +64,39 @@ TEST(Runtime, GetArcadiaTestsData) { } TEST(Runtime, GetWorkPath) { - NTesting::TScopedEnvironment contextGuard("YA_TEST_CONTEXT_FILE", ""); // remove context filename + NTesting::TScopedEnvironment contextGuard("YA_TEST_CONTEXT_FILE", ""); // remove context filename { auto tmpDir = ::GetSystemTempDir(); NTesting::TScopedEnvironment guard("TEST_WORK_PATH", tmpDir); - Singleton<NPrivate::TTestEnv>()->ReInitialize(); + Singleton<NPrivate::TTestEnv>()->ReInitialize(); EXPECT_EQ(tmpDir, GetWorkPath()); } { NTesting::TScopedEnvironment guard("TEST_WORK_PATH", ""); - Singleton<NPrivate::TTestEnv>()->ReInitialize(); + Singleton<NPrivate::TTestEnv>()->ReInitialize(); EXPECT_TRUE(!GetWorkPath().empty()); } } TEST(Runtime, GetOutputPath) { - NTesting::TScopedEnvironment contextGuard("YA_TEST_CONTEXT_FILE", ""); // remove context filename - Singleton<NPrivate::TTestEnv>()->ReInitialize(); + NTesting::TScopedEnvironment contextGuard("YA_TEST_CONTEXT_FILE", ""); // remove context filename + Singleton<NPrivate::TTestEnv>()->ReInitialize(); EXPECT_EQ(GetOutputPath().Basename(), "testing_out_stuff"); } TEST(Runtime, GetRamDrivePath) { - NTesting::TScopedEnvironment contextGuard("YA_TEST_CONTEXT_FILE", ""); // remove context filename + NTesting::TScopedEnvironment contextGuard("YA_TEST_CONTEXT_FILE", ""); // remove context filename auto tmpDir = ::GetSystemTempDir(); NTesting::TScopedEnvironment guard("YA_TEST_RAM_DRIVE_PATH", tmpDir); - Singleton<NPrivate::TTestEnv>()->ReInitialize(); + Singleton<NPrivate::TTestEnv>()->ReInitialize(); EXPECT_EQ(tmpDir, GetRamDrivePath()); } TEST(Runtime, GetOutputRamDrivePath) { - NTesting::TScopedEnvironment contextGuard("YA_TEST_CONTEXT_FILE", ""); // remove context filename + NTesting::TScopedEnvironment contextGuard("YA_TEST_CONTEXT_FILE", ""); // remove context filename auto tmpDir = ::GetSystemTempDir(); NTesting::TScopedEnvironment guard("YA_TEST_OUTPUT_RAM_DRIVE_PATH", tmpDir); - Singleton<NPrivate::TTestEnv>()->ReInitialize(); + Singleton<NPrivate::TTestEnv>()->ReInitialize(); EXPECT_EQ(tmpDir, GetOutputRamDrivePath()); } |