aboutsummaryrefslogtreecommitdiff
path: root/tests/libwallet_api_tests/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libwallet_api_tests/scripts')
-rwxr-xr-xtests/libwallet_api_tests/scripts/create_wallets.sh20
-rwxr-xr-xtests/libwallet_api_tests/scripts/mining_start.sh4
-rwxr-xr-xtests/libwallet_api_tests/scripts/mining_stop.sh4
-rwxr-xr-xtests/libwallet_api_tests/scripts/open_wallet_1.sh5
-rwxr-xr-xtests/libwallet_api_tests/scripts/open_wallet_2.sh5
-rwxr-xr-xtests/libwallet_api_tests/scripts/open_wallet_3.sh4
-rwxr-xr-xtests/libwallet_api_tests/scripts/open_wallet_4.sh4
-rwxr-xr-xtests/libwallet_api_tests/scripts/open_wallet_5.sh4
-rwxr-xr-xtests/libwallet_api_tests/scripts/open_wallet_miner.sh4
-rwxr-xr-xtests/libwallet_api_tests/scripts/send_funds.sh21
10 files changed, 75 insertions, 0 deletions
diff --git a/tests/libwallet_api_tests/scripts/create_wallets.sh b/tests/libwallet_api_tests/scripts/create_wallets.sh
new file mode 100755
index 000000000..fd3db838c
--- /dev/null
+++ b/tests/libwallet_api_tests/scripts/create_wallets.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+function create_wallet {
+ wallet_name=$1
+ echo 0 | simplewallet --testnet --trusted-daemon --daemon-address localhost:38081 --generate-new-wallet $wallet_name --password "" --restore-height=1
+}
+
+
+
+create_wallet wallet_01.bin
+create_wallet wallet_02.bin
+create_wallet wallet_03.bin
+#create_wallet wallet_04.bin
+create_wallet wallet_05.bin
+create_wallet wallet_06.bin
+
+
+#create_wallet wallet_m
+
+
diff --git a/tests/libwallet_api_tests/scripts/mining_start.sh b/tests/libwallet_api_tests/scripts/mining_start.sh
new file mode 100755
index 000000000..76eabfc55
--- /dev/null
+++ b/tests/libwallet_api_tests/scripts/mining_start.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+rlwrap simplewallet --wallet-file wallet_m --password "" --testnet --trusted-daemon --daemon-address localhost:38081 --log-file wallet_m.log start_mining
+
diff --git a/tests/libwallet_api_tests/scripts/mining_stop.sh b/tests/libwallet_api_tests/scripts/mining_stop.sh
new file mode 100755
index 000000000..640e56943
--- /dev/null
+++ b/tests/libwallet_api_tests/scripts/mining_stop.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+rlwrap simplewallet --wallet-file wallet_m --password "" --testnet --trusted-daemon --daemon-address localhost:38081 --log-file wallet_miner.log stop_mining
+
diff --git a/tests/libwallet_api_tests/scripts/open_wallet_1.sh b/tests/libwallet_api_tests/scripts/open_wallet_1.sh
new file mode 100755
index 000000000..08f4e28ab
--- /dev/null
+++ b/tests/libwallet_api_tests/scripts/open_wallet_1.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+
+rlwrap simplewallet --wallet-file wallet_01.bin --password "" --testnet --trusted-daemon --daemon-address localhost:38081 --log-file wallet_01.log
+
diff --git a/tests/libwallet_api_tests/scripts/open_wallet_2.sh b/tests/libwallet_api_tests/scripts/open_wallet_2.sh
new file mode 100755
index 000000000..8a16a6647
--- /dev/null
+++ b/tests/libwallet_api_tests/scripts/open_wallet_2.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+
+rlwrap simplewallet --wallet-file wallet_02.bin --password "" --testnet --trusted-daemon --daemon-address localhost:38081 --log-file wallet_01.log
+
diff --git a/tests/libwallet_api_tests/scripts/open_wallet_3.sh b/tests/libwallet_api_tests/scripts/open_wallet_3.sh
new file mode 100755
index 000000000..64a04b3c4
--- /dev/null
+++ b/tests/libwallet_api_tests/scripts/open_wallet_3.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+rlwrap simplewallet --wallet-file wallet_03.bin --password "" --testnet --trusted-daemon --daemon-address localhost:38081 --log-file wallet_03.log
+
diff --git a/tests/libwallet_api_tests/scripts/open_wallet_4.sh b/tests/libwallet_api_tests/scripts/open_wallet_4.sh
new file mode 100755
index 000000000..8ebf0a4c7
--- /dev/null
+++ b/tests/libwallet_api_tests/scripts/open_wallet_4.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+rlwrap simplewallet --wallet-file wallet_04.bin --password "" --testnet --trusted-daemon --daemon-address localhost:38081 --log-file wallet_04.log
+
diff --git a/tests/libwallet_api_tests/scripts/open_wallet_5.sh b/tests/libwallet_api_tests/scripts/open_wallet_5.sh
new file mode 100755
index 000000000..8ebf0a4c7
--- /dev/null
+++ b/tests/libwallet_api_tests/scripts/open_wallet_5.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+rlwrap simplewallet --wallet-file wallet_04.bin --password "" --testnet --trusted-daemon --daemon-address localhost:38081 --log-file wallet_04.log
+
diff --git a/tests/libwallet_api_tests/scripts/open_wallet_miner.sh b/tests/libwallet_api_tests/scripts/open_wallet_miner.sh
new file mode 100755
index 000000000..07a4e58ea
--- /dev/null
+++ b/tests/libwallet_api_tests/scripts/open_wallet_miner.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+rlwrap simplewallet --wallet-file wallet_m --password "" --testnet --trusted-daemon --daemon-address 127.0.0.1:38081 --log-file wallet_m.log
+
diff --git a/tests/libwallet_api_tests/scripts/send_funds.sh b/tests/libwallet_api_tests/scripts/send_funds.sh
new file mode 100755
index 000000000..801d63609
--- /dev/null
+++ b/tests/libwallet_api_tests/scripts/send_funds.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+
+
+function send_funds {
+ local amount=$1
+ local dest=$(cat "$2.address.txt")
+
+ simplewallet --wallet-file wallet_m --password "" \
+ --testnet --trusted-daemon --daemon-address localhost:38081 --log-file wallet_m.log \
+ --command transfer $dest $amount
+}
+
+
+send_funds 100 wallet_01.bin
+send_funds 100 wallet_02.bin
+send_funds 100 wallet_03.bin
+send_funds 100 wallet_04.bin
+send_funds 100 wallet_05.bin
+
+