[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated (373d9df0 -> 8cc927b7)
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated (373d9df0 -> 8cc927b7) |
Date: |
Wed, 23 Aug 2023 10:29:32 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a change to branch master
in repository exchange.
from 373d9df0 improve logging, fix client-side serialization of new /keys
options
new fc461d11 shellcheck fixes
new 8cc927b7 setup accounts also for fakebank setup
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
src/bank-lib/test_bank.sh | 37 +++++++++++++++++++++++++++----------
src/testing/taler-unified-setup.sh | 35 +++++++++++++++++++++++++++++++++--
2 files changed, 60 insertions(+), 12 deletions(-)
diff --git a/src/bank-lib/test_bank.sh b/src/bank-lib/test_bank.sh
index 7d72497e..686f78dd 100755
--- a/src/bank-lib/test_bank.sh
+++ b/src/bank-lib/test_bank.sh
@@ -1,20 +1,20 @@
#!/bin/bash
# This file is in the public domain.
-
+# shellcheck disable=SC2317
set -eu
# Exit, with status code "skip" (no 'real' failure)
function exit_skip() {
- echo $1
+ echo "$1"
exit 77
}
# Cleanup to run whenever we exit
function cleanup()
{
- for n in `jobs -p`
+ for n in $(jobs -p)
do
- kill $n 2> /dev/null || true
+ kill "$n" 2> /dev/null || true
done
wait
}
@@ -24,21 +24,30 @@ trap cleanup EXIT
echo -n "Launching bank..."
-taler-fakebank-run -c test_bank.conf -L DEBUG &> bank.log &
+taler-fakebank-run \
+ -c test_bank.conf \
+ -L DEBUG &> bank.log &
# Wait for bank to be available (usually the slowest)
-for n in `seq 1 50`
+for n in $(seq 1 50)
do
echo -n "."
sleep 0.2
OK=0
# bank
- wget --tries=1 --timeout=1 http://localhost:8899/ -o /dev/null -O
/dev/null >/dev/null || continue
+ wget \
+ --tries=1 \
+ --timeout=1 \
+ http://localhost:8899/ \
+ -o /dev/null \
+ -O /dev/null \
+ >/dev/null \
+ || continue
OK=1
break
done
-if [ 1 != $OK ]
+if [ 1 != "$OK" ]
then
exit_skip "Failed to launch services (bank)"
fi
@@ -56,7 +65,11 @@ echo " OK"
echo -n "Requesting exchange incoming transaction list ..."
-./taler-exchange-wire-gateway-client -b http://localhost:8899/exchange/ -i |
grep TESTKUDOS:4 > /dev/null
+./taler-exchange-wire-gateway-client \
+ -b http://localhost:8899/exchange/ \
+ -i \
+ | grep TESTKUDOS:4 \
+ > /dev/null
echo " OK"
@@ -73,7 +86,11 @@ echo " OK"
echo -n "Requesting exchange's outgoing transaction list..."
-./taler-exchange-wire-gateway-client -b http://localhost:8899/exchange/ -o |
grep TESTKUDOS:2 > /dev/null
+./taler-exchange-wire-gateway-client \
+ -b http://localhost:8899/exchange/ \
+ -o \
+ | grep TESTKUDOS:2 \
+ > /dev/null
echo " OK"
diff --git a/src/testing/taler-unified-setup.sh
b/src/testing/taler-unified-setup.sh
index 04a80c65..bdd7bf19 100755
--- a/src/testing/taler-unified-setup.sh
+++ b/src/testing/taler-unified-setup.sh
@@ -227,6 +227,20 @@ register_sandbox_account() {
unset LIBEUFIN_SANDBOX_PASSWORD
}
+register_fakebank_account() {
+ BODY='{"username":"'"$1"'","password":"'"$2"'"}'
+ wget \
+ --post-data="$BODY" \
+ --header='Content-type: application/json' \
+ --tries=3 \
+ --waitretry=1 \
+ --timeout=30 \
+ "http://localhost:$BANK_PORT/taler-bank-access/testing/register" \
+ -o /dev/null \
+ -O /dev/null \
+ >/dev/null
+}
+
if [[ "1" = "$START_NEXUS" || "1" = "$START_FAKEBANK" ]]
then
@@ -449,10 +463,13 @@ fi
if [ "1" = "$START_FAKEBANK" ]
then
echo "Setting up fakebank ..."
- $USE_VALGRIND taler-fakebank-run -c "$CONF" -L "$LOGLEVEL" -n 4 2>
taler-fakebank-run.log &
+ $USE_VALGRIND taler-fakebank-run\
+ -c "$CONF" \
+ -L "$LOGLEVEL" \
+ -n 4 \
+ 2> taler-fakebank-run.log &
fi
-
if [ "1" = "$START_EXCHANGE" ]
then
echo -n "Starting exchange ..."
@@ -598,6 +615,20 @@ then
echo " OK"
fi
+if [ "1" = "$START_FAKEBANK" ]
+then
+ echo -n "Register Fakebank users ..."
+ register_fakebank_account fortytwo x
+ register_fakebank_account fortythree x
+ register_fakebank_account exchange x
+ register_fakebank_account tor x
+ register_fakebank_account gnunet x
+ register_fakebank_account tutorial x
+ register_fakebank_account survey x
+ echo " DONE"
+fi
+
+
echo -n "Waiting for Taler services ..."
# Wait for all other taler services to be available
E_DONE=0
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-exchange] branch master updated (373d9df0 -> 8cc927b7),
gnunet <=