Use common SetDataDir method to create temp directory in tests.
This commit is contained in:
1 parent
43ae5ee9e4
commit
075429a482
5 files changed
+42
-29
No files matched your search
@@ -130,6 +130,8 @@ BOOST_FIXTURE_TEST_CASE(importwallet_rescan, TestChain100Setup)
|
||||
|
||||
LOCK(cs_main);
|
||||
|
||||
std::string backup_file = (SetDataDir("importwallet_rescan") / "wallet.backup").string();
|
||||
|
||||
// Import key into wallet and call dumpwallet to create backup file.
|
||||
{
|
||||
std::shared_ptr<CWallet> wallet = std::make_shared<CWallet>("dummy", WalletDatabase::CreateDummy());
|
||||
@@ -139,7 +141,7 @@ BOOST_FIXTURE_TEST_CASE(importwallet_rescan, TestChain100Setup)
|
||||
|
||||
JSONRPCRequest request;
|
||||
request.params.setArray();
|
||||
request.params.push_back((pathTemp / "wallet.backup").string());
|
||||
request.params.push_back(backup_file);
|
||||
AddWallet(wallet);
|
||||
::dumpwallet(request);
|
||||
RemoveWallet(wallet);
|
||||
@@ -152,7 +154,7 @@ BOOST_FIXTURE_TEST_CASE(importwallet_rescan, TestChain100Setup)
|
||||
|
||||
JSONRPCRequest request;
|
||||
request.params.setArray();
|
||||
request.params.push_back((pathTemp / "wallet.backup").string());
|
||||
request.params.push_back(backup_file);
|
||||
AddWallet(wallet);
|
||||
::importwallet(request);
|
||||
RemoveWallet(wallet);
|
||||
|
||||
Reference in new issue
Block a user