gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-exchange] branch master updated: finally nexus bank starts via un


From: gnunet
Subject: [taler-exchange] branch master updated: finally nexus bank starts via unified-setup
Date: Tue, 10 Oct 2023 23:18:53 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new 28747422 finally nexus bank starts via unified-setup
28747422 is described below

commit 2874742285909b5d98bc486bb874801cdafe6803
Author: Christian Grothoff <grothoff@gnunet.org>
AuthorDate: Tue Oct 10 23:18:47 2023 +0200

    finally nexus bank starts via unified-setup
---
 src/testing/taler-unified-setup.sh   | 25 +++++++++++++++++--------
 src/testing/test_bank_api_nexus.conf |  7 ++-----
 2 files changed, 19 insertions(+), 13 deletions(-)

diff --git a/src/testing/taler-unified-setup.sh 
b/src/testing/taler-unified-setup.sh
index 8dcbb35e..b6624b46 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 e20a33a9..94e422a8 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"

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]