aboutsummaryrefslogtreecommitdiff
path: root/src/test/util_tests.cpp
diff options
context:
space:
mode:
authorKiminuo <kiminuo@protonmail.com>2021-02-26 09:56:11 +0100
committerKiminuo <kiminuo@protonmail.com>2021-04-18 11:59:28 +0200
commit83292e2a700afbf39936bd67bb89fab5398d0066 (patch)
tree135e7629f87517f3e309d5cfd6f6a02ed1ee5c72 /src/test/util_tests.cpp
parent55c68e6f011ee604c8a65b9bca668eb4dec452aa (diff)
downloadbitcoin-83292e2a700afbf39936bd67bb89fab5398d0066.tar.xz
scripted-diff: Modify unit tests to use the ArgsManager in the BasicTestingSetup class instead of implicitly relying on gArgs.
-BEGIN VERIFY SCRIPT- git ls-files src/test/dbwrapper_tests.cpp src/test/denialofservice_tests.cpp src/test/flatfile_tests.cpp src/test/fs_tests.cpp src/test/settings_tests.cpp src/test/util_tests.cpp | xargs sed -i 's/GetDataDir()/m_args.GetDataDirPath()/g'; -END VERIFY SCRIPT-
Diffstat (limited to 'src/test/util_tests.cpp')
-rw-r--r--src/test/util_tests.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp
index a11716a7f1..92e17d7117 100644
--- a/src/test/util_tests.cpp
+++ b/src/test/util_tests.cpp
@@ -1801,7 +1801,7 @@ static constexpr char ExitCommand = 'X';
BOOST_AUTO_TEST_CASE(test_LockDirectory)
{
- fs::path dirname = GetDataDir() / "lock_dir";
+ fs::path dirname = m_args.GetDataDirPath() / "lock_dir";
const std::string lockname = ".lock";
#ifndef WIN32
// Revert SIGCHLD to default, otherwise boost.test will catch and fail on
@@ -1890,7 +1890,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 = GetDataDir();
+ fs::path tmpdirname = m_args.GetDataDirPath();
BOOST_CHECK_EQUAL(DirIsWritable(tmpdirname), true);
// Should not be able to write to a non-existent dir.