diff --git a/backend/test/backend/real_server_tests.hpp b/backend/test/backend/real_server_tests.hpp index 7b9c939a..c68affe1 100644 --- a/backend/test/backend/real_server_tests.hpp +++ b/backend/test/backend/real_server_tests.hpp @@ -61,7 +61,7 @@ class RealServerTests : public ::testing::Test protected: void SetUp() override { - std::ofstream privateKeyFile{temporaryRoot / "key.private", std::ios_base::binary}; + std::ofstream privateKeyFile{isolateDirectory_.path() / "key.private", std::ios_base::binary}; privateKeyFile.write(privateKey, std::strlen(privateKey)); } @@ -140,7 +140,8 @@ class RealServerTests : public ::testing::Test } protected: - Utility::TemporaryDirectory isolateDirectory_{temporaryRoot, false}; + /** @brief The test's own directory for its server, removed with the test. temporaryRoot outlives every test. */ + Utility::TemporaryDirectory isolateDirectory_{temporaryRoot}; boost::asio::thread_pool pool_{1}; nlohmann::json defaultPackageJson_ = nlohmann::json({ {"name", "test"}, diff --git a/backend/test/backend/test_existence_check.hpp b/backend/test/backend/test_existence_check.hpp index 5f6d1247..d27def1a 100644 --- a/backend/test/backend/test_existence_check.hpp +++ b/backend/test/backend/test_existence_check.hpp @@ -32,7 +32,7 @@ namespace Test return Paths::nativeToUtf8(root_.path() / relative); } - Utility::TemporaryDirectory root_{temporaryRoot, false}; + Utility::TemporaryDirectory root_{temporaryRoot}; }; TEST_F(ExistenceCheckTests, LocalMissingPathIsAbsentAndExistingPathsExist)