commit cf0c4ebfb782e3262cd4241d547d2d855c625e83
parent c3de34f3dae63fd969ee37a01aed90968474cdc1
Author: MS <ms@taler.net>
Date: Sat, 1 Apr 2023 22:03:59 +0200
cli tests helpers
Diffstat:
4 files changed, 27 insertions(+), 8 deletions(-)
diff --git a/cli/tests/launch_services.sh b/cli/tests/launch_services.sh
@@ -4,8 +4,8 @@
# EBICS pair, in order to try CLI commands.
set -eu
-# WITH_TASKS=1
-WITH_TASKS=0
+WITH_TASKS=1
+# WITH_TASKS=0
function exit_cleanup()
{
echo "Running exit-cleanup"
@@ -141,7 +141,5 @@ if test 1 = $WITH_TASKS; then
else
echo NOT creating background tasks!
fi
-echo "Requesting Taler history with 90 seconds timeout..."
-curl -u test-user:x "http://localhost:5001/facades/test-facade/taler-wire-gateway/history/incoming?delta=5&long_poll_ms=90000"
read -p "Press Enter to terminate..."
diff --git a/cli/tests/twg-history-loop.sh b/cli/tests/twg-history-loop.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+set -exu
+
+HOWMANY_SECONDS=30
+NO_LONG_POLL=0
+
+if test $NO_LONG_POLL = 1; then
+ echo "Requesting Taler history WITHOUT any long-poll in infinite loop..."
+ while true; do
+ curl -u test-user:x \
+ "http://localhost:5001/facades/test-facade/taler-wire-gateway/history/incoming?delta=5"
+ done
+ exit
+fi
+
+echo "Requesting Taler history with $HOWMANY_SECONDS second(s) timeout in infinite loop..."
+while true; do
+ curl -v -u test-user:x \
+ "http://localhost:5001/facades/test-facade/taler-wire-gateway/history/incoming?delta=5&long_poll_ms=${HOWMANY_SECONDS}000"
+done
diff --git a/cli/tests/wire-transfer.sh b/cli/tests/wire-transfer.sh
@@ -1,13 +1,13 @@
#!/bin/bash
-set -eu
+set -eux
+
# Pays the www Sandbox user, usually owned by the Exchange.
RESERVE_PUB=$(gnunet-ecc -g1 /tmp/www &> /dev/null && gnunet-ecc -p /tmp/www)
# Must match the one from launch_services.sh
-export LIBEUFIN_SANDBOX_DB_CONNECTION=jdbc:postgresql://localhost:5432/taler?user=$(whoami)
+export LIBEUFIN_SANDBOX_DB_CONNECTION="jdbc:postgresql://localhost:5432/libeufincheck?user=$(whoami)"
libeufin-sandbox \
make-transaction \
--credit-account=www \
--debit-account=admin MANA:2 \
- $RESERVE_PUB
-echo Now paid reserve $RESERVE_PUB
+ $RESERVE_PUB
diff --git a/nexus/src/test/kotlin/DownloadAndSubmit.kt b/nexus/src/test/kotlin/EbicsTest.kt