[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] 01/02: cli tests helpers
From: |
gnunet |
Subject: |
[libeufin] 01/02: cli tests helpers |
Date: |
Sat, 01 Apr 2023 22:07:08 +0200 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository libeufin.
commit cf0c4ebfb782e3262cd4241d547d2d855c625e83
Author: MS <ms@taler.net>
AuthorDate: Sat Apr 1 22:03:59 2023 +0200
cli tests helpers
---
cli/tests/launch_services.sh | 6 ++----
cli/tests/twg-history-loop.sh | 21 +++++++++++++++++++++
cli/tests/wire-transfer.sh | 8 ++++----
.../kotlin/{DownloadAndSubmit.kt => EbicsTest.kt} | 0
4 files changed, 27 insertions(+), 8 deletions(-)
diff --git a/cli/tests/launch_services.sh b/cli/tests/launch_services.sh
index 2bee7df7..17cd81d6 100755
--- 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
new file mode 100755
index 00000000..eafff9e1
--- /dev/null
+++ 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
index c29aae30..afc6fec5 100755
--- 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
similarity index 100%
rename from nexus/src/test/kotlin/DownloadAndSubmit.kt
rename to nexus/src/test/kotlin/EbicsTest.kt
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.