diff options
author | Kiminuo <kiminuo@protonmail.com> | 2021-05-04 13:00:25 +0200 |
---|---|---|
committer | Kiminuo <kiminuo@protonmail.com> | 2021-05-24 10:29:58 +0200 |
commit | 4c3a5dcbfc3010965332ad568c3a70618c930ef3 (patch) | |
tree | 654ca8d0dba267bfae1c2edebce930629dda4e45 /src/wallet/test | |
parent | 13bd8bb0536f008118b1de921654925ed9ce1da7 (diff) |
scripted-diff: Replace `GetDataDir()` calls with `gArgs.GetDataDirNet()` calls
-BEGIN VERIFY SCRIPT-
git ls-files -- 'src' ':(exclude)src/util/system.h' ':(exclude)src/util/system.cpp' | xargs sed -i 's/GetDataDir()/gArgs.GetDataDirNet()/g';
-END VERIFY SCRIPT-
Diffstat (limited to 'src/wallet/test')
-rw-r--r-- | src/wallet/test/db_tests.cpp | 12 | ||||
-rw-r--r-- | src/wallet/test/init_test_fixture.cpp | 2 | ||||
-rw-r--r-- | src/wallet/test/wallet_tests.cpp | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/wallet/test/db_tests.cpp b/src/wallet/test/db_tests.cpp index b2eb8e4bca..17f5264b45 100644 --- a/src/wallet/test/db_tests.cpp +++ b/src/wallet/test/db_tests.cpp @@ -23,7 +23,7 @@ static std::shared_ptr<BerkeleyEnvironment> GetWalletEnv(const fs::path& path, s BOOST_AUTO_TEST_CASE(getwalletenv_file) { std::string test_name = "test_name.dat"; - const fs::path datadir = GetDataDir(); + const fs::path datadir = gArgs.GetDataDirNet(); fs::path file_path = datadir / test_name; std::ofstream f(file_path.BOOST_FILESYSTEM_C_STR); f.close(); @@ -37,7 +37,7 @@ BOOST_AUTO_TEST_CASE(getwalletenv_file) BOOST_AUTO_TEST_CASE(getwalletenv_directory) { std::string expected_name = "wallet.dat"; - const fs::path datadir = GetDataDir(); + const fs::path datadir = gArgs.GetDataDirNet(); std::string filename; std::shared_ptr<BerkeleyEnvironment> env = GetWalletEnv(datadir, filename); @@ -47,8 +47,8 @@ BOOST_AUTO_TEST_CASE(getwalletenv_directory) BOOST_AUTO_TEST_CASE(getwalletenv_g_dbenvs_multiple) { - fs::path datadir = GetDataDir() / "1"; - fs::path datadir_2 = GetDataDir() / "2"; + fs::path datadir = gArgs.GetDataDirNet() / "1"; + fs::path datadir_2 = gArgs.GetDataDirNet() / "2"; std::string filename; std::shared_ptr<BerkeleyEnvironment> env_1 = GetWalletEnv(datadir, filename); @@ -61,8 +61,8 @@ BOOST_AUTO_TEST_CASE(getwalletenv_g_dbenvs_multiple) BOOST_AUTO_TEST_CASE(getwalletenv_g_dbenvs_free_instance) { - fs::path datadir = GetDataDir() / "1"; - fs::path datadir_2 = GetDataDir() / "2"; + fs::path datadir = gArgs.GetDataDirNet() / "1"; + fs::path datadir_2 = gArgs.GetDataDirNet() / "2"; std::string filename; std::shared_ptr <BerkeleyEnvironment> env_1_a = GetWalletEnv(datadir, filename); diff --git a/src/wallet/test/init_test_fixture.cpp b/src/wallet/test/init_test_fixture.cpp index f035a70a20..dd9354848d 100644 --- a/src/wallet/test/init_test_fixture.cpp +++ b/src/wallet/test/init_test_fixture.cpp @@ -16,7 +16,7 @@ InitWalletDirTestingSetup::InitWalletDirTestingSetup(const std::string& chainNam std::string sep; sep += fs::path::preferred_separator; - m_datadir = GetDataDir(); + m_datadir = gArgs.GetDataDirNet(); m_cwd = fs::current_path(); m_walletdir_path_cases["default"] = m_datadir / "wallets"; diff --git a/src/wallet/test/wallet_tests.cpp b/src/wallet/test/wallet_tests.cpp index 512374c34f..34bb29f79f 100644 --- a/src/wallet/test/wallet_tests.cpp +++ b/src/wallet/test/wallet_tests.cpp @@ -253,7 +253,7 @@ BOOST_FIXTURE_TEST_CASE(importwallet_rescan, TestChain100Setup) SetMockTime(KEY_TIME); m_coinbase_txns.emplace_back(CreateAndProcessBlock({}, GetScriptForRawPubKey(coinbaseKey.GetPubKey())).vtx[0]); - std::string backup_file = (GetDataDir() / "wallet.backup").string(); + std::string backup_file = (gArgs.GetDataDirNet() / "wallet.backup").string(); // Import key into wallet and call dumpwallet to create backup file. { |