Auto merge of #1585 - bitcartel:1583_stop_test_writing_to_testnet3, r=daira
Closes #1583 by setting up the datadir for the wallet gtest. Stops test writing to ~/.zcash/testnet3. Also related to #1506
This commit is contained in:
commit
cd8e856df7
|
@ -11,6 +11,8 @@
|
|||
#include "zcash/Note.hpp"
|
||||
#include "zcash/NoteEncryption.hpp"
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
using ::testing::Return;
|
||||
|
||||
extern ZCJoinSplit* params;
|
||||
|
@ -178,6 +180,13 @@ CWalletTx GetValidSpend(const libzcash::SpendingKey& sk,
|
|||
return wtx;
|
||||
}
|
||||
|
||||
TEST(wallet_tests, setup_datadir_location_run_as_first_test) {
|
||||
// Get temporary and unique path for file.
|
||||
boost::filesystem::path pathTemp = boost::filesystem::temp_directory_path() / boost::filesystem::unique_path();
|
||||
boost::filesystem::create_directories(pathTemp);
|
||||
mapArgs["-datadir"] = pathTemp.string();
|
||||
}
|
||||
|
||||
TEST(wallet_tests, note_data_serialisation) {
|
||||
auto sk = libzcash::SpendingKey::random();
|
||||
auto wtx = GetValidReceive(sk, 10, true);
|
||||
|
|
Loading…
Reference in New Issue