mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-12-23 00:08:54 +00:00
Merge pull request #2963
0e19a394
tests: test wallets don't need a dummy temp file anymore (moneromooo-monero)
This commit is contained in:
commit
753215b9c6
@ -53,16 +53,8 @@ int ColdOutputsFuzzer::init()
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
boost::filesystem::remove("/tmp/cold-outputs-test.keys");
|
|
||||||
boost::filesystem::remove("/tmp/cold-outputs-test.address.txt");
|
|
||||||
boost::filesystem::remove("/tmp/cold-outputs-test");
|
|
||||||
|
|
||||||
wallet.init("");
|
wallet.init("");
|
||||||
wallet.generate("/tmp/cold-outputs-test", "", spendkey, true, false);
|
wallet.generate("", "", spendkey, true, false);
|
||||||
|
|
||||||
boost::filesystem::remove("/tmp/cold-outputs-test.keys");
|
|
||||||
boost::filesystem::remove("/tmp/cold-outputs-test.address.txt");
|
|
||||||
boost::filesystem::remove("/tmp/cold-outputs-test");
|
|
||||||
}
|
}
|
||||||
catch (const std::exception &e)
|
catch (const std::exception &e)
|
||||||
{
|
{
|
||||||
|
@ -54,16 +54,8 @@ int ColdTransactionFuzzer::init()
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
boost::filesystem::remove("/tmp/cold-transaction-test.keys");
|
|
||||||
boost::filesystem::remove("/tmp/cold-transaction-test.address.txt");
|
|
||||||
boost::filesystem::remove("/tmp/cold-transaction-test");
|
|
||||||
|
|
||||||
wallet.init("");
|
wallet.init("");
|
||||||
wallet.generate("/tmp/cold-transaction-test", "", spendkey, true, false);
|
wallet.generate("", "", spendkey, true, false);
|
||||||
|
|
||||||
boost::filesystem::remove("/tmp/cold-transaction-test.keys");
|
|
||||||
boost::filesystem::remove("/tmp/cold-transaction-test.address.txt");
|
|
||||||
boost::filesystem::remove("/tmp/cold-transaction-test");
|
|
||||||
}
|
}
|
||||||
catch (const std::exception &e)
|
catch (const std::exception &e)
|
||||||
{
|
{
|
||||||
|
@ -54,16 +54,8 @@ int SignatureFuzzer::init()
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
boost::filesystem::remove("/tmp/signature-test.keys");
|
|
||||||
boost::filesystem::remove("/tmp/signature-test.address.txt");
|
|
||||||
boost::filesystem::remove("/tmp/signature-test");
|
|
||||||
|
|
||||||
wallet.init("");
|
wallet.init("");
|
||||||
wallet.generate("/tmp/signature-test", "", spendkey, true, false);
|
wallet.generate("", "", spendkey, true, false);
|
||||||
|
|
||||||
boost::filesystem::remove("/tmp/signature-test.keys");
|
|
||||||
boost::filesystem::remove("/tmp/signature-test.address.txt");
|
|
||||||
boost::filesystem::remove("/tmp/signature-test");
|
|
||||||
|
|
||||||
cryptonote::address_parse_info info;
|
cryptonote::address_parse_info info;
|
||||||
if (!cryptonote::get_account_address_from_str_or_url(info, true, "9uVsvEryzpN8WH2t1WWhFFCG5tS8cBNdmJYNRuckLENFimfauV5pZKeS1P2CbxGkSDTUPHXWwiYE5ZGSXDAGbaZgDxobqDN"))
|
if (!cryptonote::get_account_address_from_str_or_url(info, true, "9uVsvEryzpN8WH2t1WWhFFCG5tS8cBNdmJYNRuckLENFimfauV5pZKeS1P2CbxGkSDTUPHXWwiYE5ZGSXDAGbaZgDxobqDN"))
|
||||||
|
@ -44,7 +44,7 @@ class WalletSubaddress : public ::testing::Test
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
w1.generate(wallet_name, password, recovery_key, true, false);
|
w1.generate("", password, recovery_key, true, false);
|
||||||
}
|
}
|
||||||
catch (const std::exception& e)
|
catch (const std::exception& e)
|
||||||
{
|
{
|
||||||
@ -58,24 +58,9 @@ class WalletSubaddress : public ::testing::Test
|
|||||||
|
|
||||||
virtual void TearDown()
|
virtual void TearDown()
|
||||||
{
|
{
|
||||||
boost::filesystem::wpath wallet_file(wallet_name);
|
|
||||||
boost::filesystem::wpath wallet_address_file(wallet_name + ".address.txt");
|
|
||||||
boost::filesystem::wpath wallet_keys_file(wallet_name + ".keys");
|
|
||||||
|
|
||||||
if ( boost::filesystem::exists(wallet_file) )
|
|
||||||
boost::filesystem::remove(wallet_file);
|
|
||||||
|
|
||||||
if ( boost::filesystem::exists(wallet_address_file) )
|
|
||||||
boost::filesystem::remove(wallet_address_file);
|
|
||||||
|
|
||||||
if ( boost::filesystem::exists(wallet_keys_file) )
|
|
||||||
boost::filesystem::remove(wallet_keys_file);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tools::wallet2 w1;
|
tools::wallet2 w1;
|
||||||
std::string path_working_dir = ".";
|
|
||||||
std::string path_test_wallet = "test_wallet";
|
|
||||||
const std::string wallet_name = path_working_dir + "/" + path_test_wallet;
|
|
||||||
const std::string password = "testpass";
|
const std::string password = "testpass";
|
||||||
crypto::secret_key recovery_key = crypto::secret_key();
|
crypto::secret_key recovery_key = crypto::secret_key();
|
||||||
const std::string test_label = "subaddress test label";
|
const std::string test_label = "subaddress test label";
|
||||||
|
Loading…
Reference in New Issue
Block a user