aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <grothoff@gnunet.org>2023-10-10 23:18:47 +0200
committerChristian Grothoff <grothoff@gnunet.org>2023-10-10 23:18:47 +0200
commit2874742285909b5d98bc486bb874801cdafe6803 (patch)
tree174f26af1673ccce290d04ac87433964c9cd1842
parentd02ec767798475784ef0f9eb5856a23db6b73de3 (diff)
downloadexchange-2874742285909b5d98bc486bb874801cdafe6803.tar.xz
finally nexus bank starts via unified-setup
-rwxr-xr-xsrc/testing/taler-unified-setup.sh25
-rw-r--r--src/testing/test_bank_api_nexus.conf7
2 files changed, 19 insertions, 13 deletions
diff --git a/src/testing/taler-unified-setup.sh b/src/testing/taler-unified-setup.sh
index 8dcbb35eb..b6624b467 100755
--- a/src/testing/taler-unified-setup.sh
+++ b/src/testing/taler-unified-setup.sh
@@ -215,9 +215,10 @@ register_bank_account() {
--method=DELETE \
-o /dev/null \
-O /dev/null \
+ -a wget-delete-account.log \
"http://localhost:${BANK_PORT}/accounts/$1" \
|| true # deletion may fail, that's OK!
- if [ "$3" = "exchange" || "$3" = "Exchange" ]
+ if [ "$1" = "exchange" ] || [ "$1" = "Exchange" ]
then
IS_EXCHANGE="true"
else
@@ -226,19 +227,23 @@ register_bank_account() {
MAYBE_IBAN="${4:-}"
if test -n "$MAYBE_IBAN";
then
+ ENAME=$(echo "$3" | sed -e "s/ /+/g")
# Note: this assumes that $3 has no spaces. Should probably escape in the future..
- PAYTO="payto://SANDBOXX/${MAYBE_IBAN}?receiver-name=$3"
- BODY='{username="'"$1"'",password="'"$2"'",is_taler_exchange='"$IS_EXCHANGE"',name="'"$3"'",internal_payto_uri="'"$PAYTO"'"}'
+ PAYTO="payto://iban/SANDBOXX/${MAYBE_IBAN}?receiver-name=$ENAME"
+ BODY='{"username":"'"$1"'","password":"'"$2"'","is_taler_exchange":'"$IS_EXCHANGE"',"name":"'"$3"'","internal_payto_uri":"'"$PAYTO"'"}'
else
- BODY='{username="'"$1"'",password="'"$2"'",is_taler_exchange='"$IS_EXCHANGE"',name="'"$3"'"}'
+ BODY='{"username":"'"$1"'","password":"'"$2"'","is_taler_exchange":'"$IS_EXCHANGE"',"name":"'"$3"'"}'
fi
wget \
--http-user="$AUSER" \
--http-password="$APASS" \
--method=POST \
+ --header='Content-type: application/json' \
--body-data="${BODY}" \
- -a wget.log \
- "http://localhost:${BANK_PORT}/accounts/$1"
+ --content-on-error \
+ -a wget-register-account.log \
+ -O wget-register-account.err \
+ "http://localhost:${BANK_PORT}/accounts"
}
register_fakebank_account() {
@@ -274,7 +279,7 @@ then
echo "DONE"
echo -n "Launching bank ... "
libeufin-bank serve \
- --port "$BANK_PORT" \
+ -c "$CONF" \
> libeufin-bank-stdout.log \
2> libeufin-bank-stderr.log &
echo $! > libeufin-bank.pid
@@ -300,7 +305,11 @@ then
echo -n "Set admin password..."
AUSER="admin"
APASS="secret"
- libeufin-bank passwd "$AUSER" "$APASS"
+ libeufin-bank \
+ passwd \
+ -c "$CONF" \
+ "$AUSER" "$APASS" \
+ &> libeufin-bank-passwd.log
echo " OK"
fi
diff --git a/src/testing/test_bank_api_nexus.conf b/src/testing/test_bank_api_nexus.conf
index e20a33a98..94e422a8a 100644
--- a/src/testing/test_bank_api_nexus.conf
+++ b/src/testing/test_bank_api_nexus.conf
@@ -10,8 +10,5 @@ WIRE_GATEWAY_AUTH_METHOD = basic
USERNAME = exchange
PASSWORD = x
-[libeufin-nexus]
-DB_CONNECTION="postgresql:///talercheck"
-
-[libeufin-sandbox]
-DB_CONNECTION="postgresql:///talercheck"
+[libeufin-bankdb-postgres]
+CONFIG="postgresql:///talercheck"