mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-12 00:26:03 +01:00
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-
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user