test: Create data dir in BasicTestingSetup

This commit is contained in:
MarcoFalke
2019-06-19 17:52:35 -04:00
parent b1344eac5f
commit fad3d2a624
11 changed files with 28 additions and 42 deletions

View File

@@ -1398,7 +1398,7 @@ static void TestOtherProcess(fs::path dirname, std::string lockname, int fd)
BOOST_AUTO_TEST_CASE(test_LockDirectory)
{
fs::path dirname = SetDataDir("test_LockDirectory") / fs::unique_path();
fs::path dirname = GetDataDir() / "lock_dir";
const std::string lockname = ".lock";
#ifndef WIN32
// Revert SIGCHLD to default, otherwise boost.test will catch and fail on
@@ -1487,7 +1487,7 @@ BOOST_AUTO_TEST_CASE(test_LockDirectory)
BOOST_AUTO_TEST_CASE(test_DirIsWritable)
{
// Should be able to write to the data dir.
fs::path tmpdirname = SetDataDir("test_DirIsWritable");
fs::path tmpdirname = GetDataDir();
BOOST_CHECK_EQUAL(DirIsWritable(tmpdirname), true);
// Should not be able to write to a non-existent dir.