From 66576c4fd532ac18b8b355ea93d25581a2c15654 Mon Sep 17 00:00:00 2001 From: Kiminuo Date: Fri, 15 Jan 2021 07:26:51 +0000 Subject: test: Clear forced -walletdir setting after wallet init_tests Leaving this value set interfered with the CreateWallet test if it happened to execute later in the test ordering. Specifically it would cause CreateWallet test to write data to the current directory instead of temporary test directory. --- src/wallet/test/init_test_fixture.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/wallet/test/init_test_fixture.cpp') diff --git a/src/wallet/test/init_test_fixture.cpp b/src/wallet/test/init_test_fixture.cpp index aa7f1c83d8..f035a70a20 100644 --- a/src/wallet/test/init_test_fixture.cpp +++ b/src/wallet/test/init_test_fixture.cpp @@ -3,6 +3,7 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include +#include #include #include @@ -37,6 +38,9 @@ InitWalletDirTestingSetup::InitWalletDirTestingSetup(const std::string& chainNam InitWalletDirTestingSetup::~InitWalletDirTestingSetup() { + gArgs.LockSettings([&](util::Settings& settings) { + settings.forced_settings.erase("walletdir"); + }); fs::current_path(m_cwd); } -- cgit v1.2.3