aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/testing/common/ut/env_ut.cpp
diff options
context:
space:
mode:
authorkrock21 <krock21@yandex-team.ru>2022-02-10 16:46:02 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:02 +0300
commit4aae166b5d23fd02653919f43e2015cd636fa6fd (patch)
tree70e52225c1ede3476f358bc4699197ace987d46d /library/cpp/testing/common/ut/env_ut.cpp
parent9ab30620977aa96ae9e9da959e2f7e1370cb796d (diff)
downloadydb-4aae166b5d23fd02653919f43e2015cd636fa6fd.tar.gz
Restoring authorship annotation for <krock21@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/testing/common/ut/env_ut.cpp')
-rw-r--r--library/cpp/testing/common/ut/env_ut.cpp40
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 2aed1e4a25..64a79bb411 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());
}