gnunet-svn
[Top][All Lists]
Advanced

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

[taler-deployment] branch master updated: check sandbox with auth


From: gnunet
Subject: [taler-deployment] branch master updated: check sandbox with auth
Date: Tue, 01 Nov 2022 19:33:45 +0100

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

ms pushed a commit to branch master
in repository deployment.

The following commit(s) were added to refs/heads/master by this push:
     new e759142  check sandbox with auth
e759142 is described below

commit e759142712d8463262661663887b5cb0c90919a2
Author: MS <ms@taler.net>
AuthorDate: Tue Nov 1 19:33:36 2022 +0100

    check sandbox with auth
---
 docker/hybrid/images/merchant/startup.sh | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/docker/hybrid/images/merchant/startup.sh 
b/docker/hybrid/images/merchant/startup.sh
index 67cd29a..16a841e 100644
--- a/docker/hybrid/images/merchant/startup.sh
+++ b/docker/hybrid/images/merchant/startup.sh
@@ -44,12 +44,17 @@ socat TCP-LISTEN:5556,fork,reuseaddr TCP:localhost:80 &
 
 is_serving () {
 echo Checking $1
+HEADER_OPT=""
+# --header only used for auth
+if test -n "$2"; then
+  HEADER_OPT='--header "'$2'"'
+fi
 for n in `seq 1 50`
   do
     echo "."
     sleep 0.5
     OK=1
-    wget $1 -o /dev/null -O /dev/null >/dev/null && break
+    wget $HEADER_OPT $1 -o /dev/null -O /dev/null >/dev/null && break
     OK=0
   done
   if [ 1 != $OK ]
@@ -114,10 +119,13 @@ PAYTO_RESERVE=$(
 SANDBOX_URL="http://bank:15000/demobanks/default";
 is_serving "${SANDBOX_URL}/integration-api/config"
 SURVEY_USERNAME=`taler-config -c /config/deployment.conf -s taler-deployment 
-o survey-sandbox-username`
-export LIBEUFIN_SANDBOX_USERNAME=${SURVEY_USERNAME}
-export LIBEUFIN_SANDBOX_PASSWORD=`taler-config -c /config/deployment.conf -s 
taler-deployment -o survey-sandbox-password`
+SURVEY_PASSWORD=`taler-config -c /config/deployment.conf -s taler-deployment 
-o survey-sandbox-username`
 # Check/wait that the Survey site got its bank account.
-is_serving "${SANDBOX_URL}/access-api/accounts/${SURVEY_USERNAME}"
+AUTH=$(echo "$SURVEY_USERNAME:$SURVEY_PASSWORD" | base64)
+is_serving "${SANDBOX_URL}/access-api/accounts/${SURVEY_USERNAME}" \
+  "Authorization: Basic $AUTH"
+export LIBEUFIN_SANDBOX_USERNAME=${SURVEY_USERNAME}
+export LIBEUFIN_SANDBOX_PASSWORD=${SURVEY_PASSWORD}
 libeufin-cli sandbox \
   --sandbox-url ${SANDBOX_URL} \
   demobank new-transaction --bank-account ${LIBEUFIN_SANDBOX_USERNAME} \

-- 
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]