aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/libwallet_api_tests/main.cpp39
-rwxr-xr-xtests/libwallet_api_tests/scripts/create_wallets.sh2
-rwxr-xr-xtests/libwallet_api_tests/scripts/open_wallet_5.sh2
-rwxr-xr-xtests/libwallet_api_tests/scripts/send_funds.sh1
4 files changed, 29 insertions, 15 deletions
diff --git a/tests/libwallet_api_tests/main.cpp b/tests/libwallet_api_tests/main.cpp
index ebd29ee1e..91636d522 100644
--- a/tests/libwallet_api_tests/main.cpp
+++ b/tests/libwallet_api_tests/main.cpp
@@ -73,11 +73,12 @@ const std::string TESTNET_WALLET2_NAME = WALLETS_ROOT_DIR + "wallet_02.bin";
const std::string TESTNET_WALLET3_NAME = WALLETS_ROOT_DIR + "wallet_03.bin";
const std::string TESTNET_WALLET4_NAME = WALLETS_ROOT_DIR + "wallet_04.bin";
const std::string TESTNET_WALLET5_NAME = WALLETS_ROOT_DIR + "wallet_05.bin";
+const std::string TESTNET_WALLET6_NAME = WALLETS_ROOT_DIR + "wallet_06.bin";
const char * TESTNET_WALLET_PASS = "";
const std::string CURRENT_SRC_WALLET = TESTNET_WALLET1_NAME;
-const std::string CURRENT_DST_WALLET = TESTNET_WALLET5_NAME;
+const std::string CURRENT_DST_WALLET = TESTNET_WALLET6_NAME;
const char * TESTNET_DAEMON_ADDRESS = "localhost:38081";
const uint64_t AMOUNT_10XMR = 10000000000000L;
@@ -131,12 +132,12 @@ struct Utils
};
-struct DISABLED_WalletManagerTest : public testing::Test
+struct WalletManagerTest : public testing::Test
{
Bitmonero::WalletManager * wmgr;
- DISABLED_WalletManagerTest()
+ WalletManagerTest()
{
std::cout << __FUNCTION__ << std::endl;
wmgr = Bitmonero::WalletManagerFactory::getWalletManager();
@@ -145,7 +146,7 @@ struct DISABLED_WalletManagerTest : public testing::Test
}
- ~DISABLED_WalletManagerTest()
+ ~WalletManagerTest()
{
std::cout << __FUNCTION__ << std::endl;
//deleteWallet(WALLET_NAME);
@@ -180,7 +181,7 @@ struct WalletTest2 : public testing::Test
};
-TEST_F(DISABLED_WalletManagerTest, WalletManagerCreatesWallet)
+TEST_F(WalletManagerTest, WalletManagerCreatesWallet)
{
Bitmonero::Wallet * wallet = wmgr->createWallet(WALLET_NAME, WALLET_PASS, WALLET_LANG);
@@ -197,7 +198,7 @@ TEST_F(DISABLED_WalletManagerTest, WalletManagerCreatesWallet)
}
-TEST_F(DISABLED_WalletManagerTest, WalletManagerOpensWallet)
+TEST_F(WalletManagerTest, WalletManagerOpensWallet)
{
Bitmonero::Wallet * wallet1 = wmgr->createWallet(WALLET_NAME, WALLET_PASS, WALLET_LANG);
@@ -209,8 +210,8 @@ TEST_F(DISABLED_WalletManagerTest, WalletManagerOpensWallet)
std::cout << "** seed: " << wallet2->seed() << std::endl;
}
-
-TEST_F(DISABLED_WalletManagerTest, WalletManagerChangesPassword)
+/*
+TEST_F(WalletManagerTest, WalletManagerChangesPassword)
{
Bitmonero::Wallet * wallet1 = wmgr->createWallet(WALLET_NAME, WALLET_PASS, WALLET_LANG);
std::string seed1 = wallet1->seed();
@@ -226,7 +227,7 @@ TEST_F(DISABLED_WalletManagerTest, WalletManagerChangesPassword)
-TEST_F(DISABLED_WalletManagerTest, WalletManagerRecoversWallet)
+TEST_F(WalletManagerTest, WalletManagerRecoversWallet)
{
Bitmonero::Wallet * wallet1 = wmgr->createWallet(WALLET_NAME, WALLET_PASS, WALLET_LANG);
std::string seed1 = wallet1->seed();
@@ -242,7 +243,7 @@ TEST_F(DISABLED_WalletManagerTest, WalletManagerRecoversWallet)
}
-TEST_F(DISABLED_WalletManagerTest, WalletManagerStoresWallet1)
+TEST_F(WalletManagerTest, WalletManagerStoresWallet1)
{
Bitmonero::Wallet * wallet1 = wmgr->createWallet(WALLET_NAME, WALLET_PASS, WALLET_LANG);
std::string seed1 = wallet1->seed();
@@ -259,7 +260,7 @@ TEST_F(DISABLED_WalletManagerTest, WalletManagerStoresWallet1)
}
-TEST_F(DISABLED_WalletManagerTest, WalletManagerStoresWallet2)
+TEST_F(WalletManagerTest, WalletManagerStoresWallet2)
{
Bitmonero::Wallet * wallet1 = wmgr->createWallet(WALLET_NAME, WALLET_PASS, WALLET_LANG);
std::string seed1 = wallet1->seed();
@@ -275,7 +276,7 @@ TEST_F(DISABLED_WalletManagerTest, WalletManagerStoresWallet2)
ASSERT_TRUE(wmgr->closeWallet(wallet1));
}
-TEST_F(DISABLED_WalletManagerTest, WalletManagerStoresWallet3)
+TEST_F(WalletManagerTest, WalletManagerStoresWallet3)
{
Bitmonero::Wallet * wallet1 = wmgr->createWallet(WALLET_NAME, WALLET_PASS, WALLET_LANG);
std::string seed1 = wallet1->seed();
@@ -297,7 +298,7 @@ TEST_F(DISABLED_WalletManagerTest, WalletManagerStoresWallet3)
}
-TEST_F(DISABLED_WalletManagerTest, WalletManagerStoresWallet4)
+TEST_F(WalletManagerTest, WalletManagerStoresWallet4)
{
Bitmonero::Wallet * wallet1 = wmgr->createWallet(WALLET_NAME, WALLET_PASS, WALLET_LANG);
std::string seed1 = wallet1->seed();
@@ -317,7 +318,17 @@ TEST_F(DISABLED_WalletManagerTest, WalletManagerStoresWallet4)
ASSERT_TRUE(wallet1->address() == address1);
ASSERT_TRUE(wmgr->closeWallet(wallet1));
}
+*/
+TEST_F(WalletManagerTest, WalletManagerFindsWallet)
+{
+ std::vector<std::string> wallets = wmgr->findWallets(WALLETS_ROOT_DIR);
+ ASSERT_FALSE(wallets.empty());
+ std::cout << "Found wallets: " << std::endl;
+ for (auto wallet_path: wallets) {
+ std::cout << wallet_path << std::endl;
+ }
+}
TEST_F(WalletTest1, WalletShowsBalance)
@@ -349,6 +360,8 @@ TEST_F(WalletTest1, WalletRefresh)
ASSERT_TRUE(wmgr->closeWallet(wallet1));
}
+
+
TEST_F(WalletTest1, WalletTransaction)
{
Bitmonero::Wallet * wallet1 = wmgr->openWallet(CURRENT_SRC_WALLET, TESTNET_WALLET_PASS, true);
diff --git a/tests/libwallet_api_tests/scripts/create_wallets.sh b/tests/libwallet_api_tests/scripts/create_wallets.sh
index fd3db838c..6abad84f9 100755
--- a/tests/libwallet_api_tests/scripts/create_wallets.sh
+++ b/tests/libwallet_api_tests/scripts/create_wallets.sh
@@ -10,7 +10,7 @@ function create_wallet {
create_wallet wallet_01.bin
create_wallet wallet_02.bin
create_wallet wallet_03.bin
-#create_wallet wallet_04.bin
+create_wallet wallet_04.bin
create_wallet wallet_05.bin
create_wallet wallet_06.bin
diff --git a/tests/libwallet_api_tests/scripts/open_wallet_5.sh b/tests/libwallet_api_tests/scripts/open_wallet_5.sh
index 8ebf0a4c7..bbeb702c0 100755
--- a/tests/libwallet_api_tests/scripts/open_wallet_5.sh
+++ b/tests/libwallet_api_tests/scripts/open_wallet_5.sh
@@ -1,4 +1,4 @@
#!/bin/bash
-rlwrap simplewallet --wallet-file wallet_04.bin --password "" --testnet --trusted-daemon --daemon-address localhost:38081 --log-file wallet_04.log
+rlwrap simplewallet --wallet-file wallet_05.bin --password "" --testnet --trusted-daemon --daemon-address localhost:38081 --log-file wallet_05.log
diff --git a/tests/libwallet_api_tests/scripts/send_funds.sh b/tests/libwallet_api_tests/scripts/send_funds.sh
index 801d63609..306b06a40 100755
--- a/tests/libwallet_api_tests/scripts/send_funds.sh
+++ b/tests/libwallet_api_tests/scripts/send_funds.sh
@@ -17,5 +17,6 @@ send_funds 100 wallet_02.bin
send_funds 100 wallet_03.bin
send_funds 100 wallet_04.bin
send_funds 100 wallet_05.bin
+send_funds 100 wallet_06.bin