From baef188ed0a7aec86724322e7717af5360232c3d Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 23 Jul 2023 14:49:10 +0200 Subject: [PATCH 1/8] tolerate unset --- src/testing/taler-unified-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/testing/taler-unified-setup.sh b/src/testing/taler-unified-setup.sh index e1365913d..09999aef2 100755 --- a/src/testing/taler-unified-setup.sh +++ b/src/testing/taler-unified-setup.sh @@ -244,7 +244,7 @@ if [ "1" = "$START_SANDBOX" ] then # LIBEUFIN_SANDBOX_DB_CONNECTION=$(taler-config -c "$CONF" -s "libeufin-sandbox" -o "DB_CONNECTION") - if [ ! -z "$PGHOST" ] + if [ ! -z "${PGHOST:+}" ] then EHOST=$(echo $PGHOST | sed -e "s/\//\\\\\//g") LIBEUFIN_SANDBOX_DB_CONNECTION=$(echo $LIBEUFIN_SANDBOX_DB_CONNECTION | sed -e "s/\/var\/run\/postgresql/$EHOST/") From 77e06dda9179e6b26184824414195a64c88f3d23 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 23 Jul 2023 14:52:23 +0200 Subject: [PATCH 2/8] tolerate unset --- src/testing/taler-unified-setup.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/testing/taler-unified-setup.sh b/src/testing/taler-unified-setup.sh index 09999aef2..48e164c2f 100755 --- a/src/testing/taler-unified-setup.sh +++ b/src/testing/taler-unified-setup.sh @@ -254,6 +254,7 @@ then # Create the default demobank. echo -n "Configuring sandbox at ${LIBEUFIN_SANDBOX_DB_CONNECTION} " + libeufin-sandbox reset-tables libeufin-sandbox config \ --currency "$CURRENCY" \ --users-debt-limit 99999999 \ @@ -344,13 +345,14 @@ then # to the exchange. LIBEUFIN_NEXUS_DB_CONNECTION=$(taler-config -c "$CONF" -s "libeufin-nexus" -o "DB_CONNECTION") - if [ ! -z "$PGHOST" ] + if [ ! -z "${PGHOST:+}" ] then EHOST=$(echo $PGHOST | sed -e "s/\//\\\\\//g") LIBEUFIN_NEXUS_DB_CONNECTION=$(echo $LIBEUFIN_NEXUS_DB_CONNECTION | sed -e "s/\/var\/run\/postgresql/$EHOST/") taler-config -c "$CONF" -s "libeufin-nexus" -o "DB_CONNECTION" -V "$LIBEUFIN_NEXUS_DB_CONNECTION" fi export LIBEUFIN_NEXUS_DB_CONNECTION + libeufin-nexus reset-tables # For convenience, username and password are # identical to those used at the Sandbox. From 16e2ac079eb67d1615e983047d2024015ce9bb42 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 23 Jul 2023 15:01:07 +0200 Subject: [PATCH 3/8] -ignore locale/ dir --- src/mhd/mhd_legal.c | 3 +++ src/testing/taler-unified-setup.sh | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mhd/mhd_legal.c b/src/mhd/mhd_legal.c index dfda58ac9..137cc436a 100644 --- a/src/mhd/mhd_legal.c +++ b/src/mhd/mhd_legal.c @@ -658,6 +658,9 @@ TALER_MHD_legal_load (const struct GNUNET_CONFIGURATION_Handle *cfg, if (lang[0] == '.') continue; + if (0 == strcmp (lang, + "locale")) + continue; load_language (legal, path, lang); diff --git a/src/testing/taler-unified-setup.sh b/src/testing/taler-unified-setup.sh index 48e164c2f..7bf14d4fb 100755 --- a/src/testing/taler-unified-setup.sh +++ b/src/testing/taler-unified-setup.sh @@ -570,7 +570,7 @@ then --timeout=1 \ --user admin \ --password secret \ - "http://localhost:8082/" \ + "http://localhost:${BANK_PORT}/" \ -o /dev/null \ -O /dev/null >/dev/null || continue OK="1" From 1879d025bf19ffaa96d86855088ea1011b8d9562 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 23 Jul 2023 15:18:33 +0200 Subject: [PATCH 4/8] handle unix --- src/testing/taler-unified-setup.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/testing/taler-unified-setup.sh b/src/testing/taler-unified-setup.sh index 7bf14d4fb..643bacefb 100755 --- a/src/testing/taler-unified-setup.sh +++ b/src/testing/taler-unified-setup.sh @@ -448,7 +448,13 @@ if [ "1" = "$START_EXCHANGE" ] then echo -n "Starting exchange ..." EXCHANGE_PORT=$(taler-config -c "$CONF" -s EXCHANGE -o PORT) - EXCHANGE_URL="http://localhost:${EXCHANGE_PORT}/" + SERVE=$(taler-config -c "$CONF" -s EXCHANGE -o SERVE) + if [ "${SERVE}"= "unix" ] + then + EXCHANGE_URL=$(taler-config -c "$CONF" -s EXCHANGE -o BASE_URL) + else + EXCHANGE_URL="http://localhost:${EXCHANGE_PORT}/" + fi MASTER_PRIV_FILE=$(taler-config -f -c "${CONF}" -s "EXCHANGE-OFFLINE" -o "MASTER_PRIV_FILE") MASTER_PRIV_DIR=$(dirname "$MASTER_PRIV_FILE") mkdir -p "${MASTER_PRIV_DIR}" From da84b478f3b4f5f35e4169d166a4104d46670279 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 23 Jul 2023 15:19:09 +0200 Subject: [PATCH 5/8] handle unix --- src/testing/taler-unified-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/testing/taler-unified-setup.sh b/src/testing/taler-unified-setup.sh index 643bacefb..c9cf6d157 100755 --- a/src/testing/taler-unified-setup.sh +++ b/src/testing/taler-unified-setup.sh @@ -449,7 +449,7 @@ then echo -n "Starting exchange ..." EXCHANGE_PORT=$(taler-config -c "$CONF" -s EXCHANGE -o PORT) SERVE=$(taler-config -c "$CONF" -s EXCHANGE -o SERVE) - if [ "${SERVE}"= "unix" ] + if [ "${SERVE}" = "unix" ] then EXCHANGE_URL=$(taler-config -c "$CONF" -s EXCHANGE -o BASE_URL) else From 7467543b57492b814f6af06a06b53af7054cc37e Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 23 Jul 2023 15:21:53 +0200 Subject: [PATCH 6/8] handle unix --- src/testing/taler-unified-setup.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/testing/taler-unified-setup.sh b/src/testing/taler-unified-setup.sh index c9cf6d157..ca5b84336 100755 --- a/src/testing/taler-unified-setup.sh +++ b/src/testing/taler-unified-setup.sh @@ -649,7 +649,7 @@ then echo -n "Wait for exchange /management/keys to be ready " OK="0" LAST_RESPONSE=$(mktemp tmp-last-response.XXXXXXXX) - for n in $(seq 1 50) + for n in $(seq 1 10) do echo -n "." sleep "$DEFAULT_SLEEP" @@ -657,8 +657,8 @@ then wget \ --tries=3 \ --waitretry=0 \ - --timeout=1 \ - "http://localhost:8081/management/keys"\ + --timeout=30 \ + "${EXCHANGE_URL}management/keys"\ -o /dev/null \ -O "$LAST_RESPONSE" \ >/dev/null || continue @@ -712,7 +712,7 @@ then wget \ --tries=1 \ --timeout=1 \ - "http://localhost:8081/keys" \ + "${EXCHANGE_URL}keys" \ -o /dev/null \ -O "$LAST_RESPONSE" \ >/dev/null || continue From 7e68ce3868da50047de6c9e48978dca02e7e840c Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 23 Jul 2023 15:36:46 +0200 Subject: [PATCH 7/8] log reset --- src/testing/taler-unified-setup.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/testing/taler-unified-setup.sh b/src/testing/taler-unified-setup.sh index ca5b84336..eaaba23c0 100755 --- a/src/testing/taler-unified-setup.sh +++ b/src/testing/taler-unified-setup.sh @@ -254,7 +254,8 @@ then # Create the default demobank. echo -n "Configuring sandbox at ${LIBEUFIN_SANDBOX_DB_CONNECTION} " - libeufin-sandbox reset-tables + libeufin-sandbox reset-tables \ + &> libeufin-sandbox-reset.log libeufin-sandbox config \ --currency "$CURRENCY" \ --users-debt-limit 99999999 \ @@ -352,7 +353,8 @@ then taler-config -c "$CONF" -s "libeufin-nexus" -o "DB_CONNECTION" -V "$LIBEUFIN_NEXUS_DB_CONNECTION" fi export LIBEUFIN_NEXUS_DB_CONNECTION - libeufin-nexus reset-tables + libeufin-nexus reset-tables \ + &> libeufin-nexus-reset.log # For convenience, username and password are # identical to those used at the Sandbox. From 21b3f38df25a756a999086b7b02179cb81d88e20 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 23 Jul 2023 15:47:30 +0200 Subject: [PATCH 8/8] -reset tables breaks stuff, badly --- src/testing/taler-unified-setup.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/testing/taler-unified-setup.sh b/src/testing/taler-unified-setup.sh index eaaba23c0..c7bad8f6b 100755 --- a/src/testing/taler-unified-setup.sh +++ b/src/testing/taler-unified-setup.sh @@ -254,8 +254,8 @@ then # Create the default demobank. echo -n "Configuring sandbox at ${LIBEUFIN_SANDBOX_DB_CONNECTION} " - libeufin-sandbox reset-tables \ - &> libeufin-sandbox-reset.log +# libeufin-sandbox reset-tables \ +# &> libeufin-sandbox-reset.log libeufin-sandbox config \ --currency "$CURRENCY" \ --users-debt-limit 99999999 \ @@ -353,8 +353,8 @@ then taler-config -c "$CONF" -s "libeufin-nexus" -o "DB_CONNECTION" -V "$LIBEUFIN_NEXUS_DB_CONNECTION" fi export LIBEUFIN_NEXUS_DB_CONNECTION - libeufin-nexus reset-tables \ - &> libeufin-nexus-reset.log +# libeufin-nexus reset-tables \ +# &> libeufin-nexus-reset.log # For convenience, username and password are # identical to those used at the Sandbox.