summaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-11-17 09:55:21 +0100
committerChristian Grothoff <christian@grothoff.org>2023-11-17 09:55:21 +0100
commit5e3d9cce0643f4c03e6c7b6fd3a485711766f2cd (patch)
tree53e7f0b4c3cd3ce0cb266e3757f9b673e3918b54 /src/testing
parent257ca169bbf12ae817f51736d1ba94c475f6a48b (diff)
downloadexchange-5e3d9cce0643f4c03e6c7b6fd3a485711766f2cd.tar.gz
exchange-5e3d9cce0643f4c03e6c7b6fd3a485711766f2cd.tar.bz2
exchange-5e3d9cce0643f4c03e6c7b6fd3a485711766f2cd.zip
-minor cleanups
Diffstat (limited to 'src/testing')
-rwxr-xr-xsrc/testing/taler-unified-setup.sh18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/testing/taler-unified-setup.sh b/src/testing/taler-unified-setup.sh
index 13b715503..479a125fa 100755
--- a/src/testing/taler-unified-setup.sh
+++ b/src/testing/taler-unified-setup.sh
@@ -260,9 +260,13 @@ register_bank_account() {
}
register_fakebank_account() {
- # FIXME: may need to pass 'is_taler_exchange' here
- # in the future to get exchange facade from libeufin!
- BODY='{"username":"'"$1"'","password":"'"$2"'","name":"'"$1"'"}'
+ if [ "$1" = "exchange" ] || [ "$1" = "Exchange" ]
+ then
+ IS_EXCHANGE="true"
+ else
+ IS_EXCHANGE="false"
+ fi
+ BODY='{"username":"'"$1"'","password":"'"$2"'","name":"'"$1"'","is_taler_exchange":'"$IS_EXCHANGE"'}'
wget \
--post-data="$BODY" \
--header='Content-type: application/json' \
@@ -270,6 +274,7 @@ register_fakebank_account() {
--waitretry=1 \
--timeout=30 \
"http://localhost:$BANK_PORT/accounts" \
+ -a wget-register-account.log \
-o /dev/null \
-O /dev/null \
>/dev/null
@@ -705,18 +710,19 @@ then
sleep "$DEFAULT_SLEEP"
wget \
--tries=1 \
- --timeout=1 \
+ --timeout=5 \
"${EXCHANGE_URL}keys" \
+ -a wget-keys-check.log \
-o /dev/null \
-O "$LAST_RESPONSE" \
- >/dev/null || continue
+ >/dev/null || continue
OK="1"
break
done
if [ "1" != "$OK" ]
then
cat "$LAST_RESPONSE"
- exit_fail " Failed to setup keys"
+ exit_fail " Failed to fetch ${EXCHANGE_URL}keys"
fi
rm "$LAST_RESPONSE"
echo " OK"