summaryrefslogtreecommitdiff
path: root/integrationtests/test-retries.sh
diff options
context:
space:
mode:
Diffstat (limited to 'integrationtests/test-retries.sh')
-rwxr-xr-xintegrationtests/test-retries.sh14
1 files changed, 8 insertions, 6 deletions
diff --git a/integrationtests/test-retries.sh b/integrationtests/test-retries.sh
index 01bfa5774..3d953eab0 100755
--- a/integrationtests/test-retries.sh
+++ b/integrationtests/test-retries.sh
@@ -8,8 +8,8 @@ normal_start_and_wait "retries"
echo "Withdraw TESTKUDOS"
taler-wallet-cli --wallet-db="$WALLET_DB" --no-throttle testing withdraw -e "$EXCHANGE_URL" -b "$BANK_URL" -a "TESTKUDOS:10" 2>>"$LOG" >>"$LOG"
-echo -n "Balance after withdrawal: "
-taler-wallet-cli --wallet-db="$WALLET_DB" balance 2>>"$LOG"
+BALANCE_1=$(get_balance)
+echo "Balance after withdrawal: $BALANCE_1"
echo "Getting pay taler:// Uri"
PAY_URI=$(taler-wallet-cli testing gen-pay-uri -m "$MERCHANT_URL" -k sandbox -a "TESTKUDOS:1" -s "foo" | grep -E -o 'taler://.*')
echo "Trying to pay with exchange down, will fail"
@@ -23,8 +23,9 @@ echo -n "Wait for exchange to start"
wait_for_service "$EXCHANGE_URL"
echo "Retrying operations with exchange up"
taler-wallet-cli --wallet-db="$WALLET_DB" run-until-done 2>>"$LOG" >>"$LOG"
-echo -n "Balance after re-tried payment: "
-taler-wallet-cli --wallet-db="$WALLET_DB" balance 2>>"$LOG"
+BALANCE_2=$(get_balance)
+echo "Balance after re-tried payment: $BALANCE_2"
+assert_less_than "$BALANCE_2" "$BALANCE_1"
echo "Getting pay taler:// Uri"
PAY_URI=$(taler-wallet-cli testing gen-pay-uri -m "$MERCHANT_URL" -k sandbox -a "TESTKUDOS:1" -s "foo" | grep -E -o 'taler://.*')
@@ -39,7 +40,8 @@ echo -n "Wait for merchant to start"
wait_for_service "$MERCHANT_URL"
echo "Retrying payment with merchant up"
taler-wallet-cli --wallet-db="$WALLET_DB" --no-throttle handle-uri --yes "$PAY_URI" 2>>"$LOG" >>"$LOG"
-echo -n "Balance after re-tried payment: "
-taler-wallet-cli --wallet-db="$WALLET_DB" balance 2>>"$LOG"
+BALANCE_3=$(get_balance)
+echo "Balance after re-tried payment: $BALANCE_3"
+assert_less_than "$BALANCE_3" "$BALANCE_2"
exit_success