gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated: fix configuration files of test-


From: gnunet
Subject: [taler-exchange] branch master updated: fix configuration files of test-auditor
Date: Sun, 24 Mar 2024 14:01:06 +0100

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 78e568ea fix configuration files of test-auditor
78e568ea is described below

commit 78e568ea0cd3b1e9cf26852ed3a80e0283a7cc1f
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sat Mar 23 14:01:04 2024 +0100

    fix configuration files of test-auditor
---
 contrib/gana                             |  2 +-
 src/auditor/generate-auditor-basedb.conf | 17 ++++++++++++++++-
 src/auditor/generate-auditor-basedb.sh   | 20 +++++++++++++++-----
 src/auditor/generate-revoke-basedb.sh    |  6 +++---
 src/auditor/setup.sh                     |  4 +++-
 src/auditor/test-auditor.sh              | 24 +++++++++++++-----------
 src/testing/test_exchange_api.conf       |  2 ++
 7 files changed, 53 insertions(+), 22 deletions(-)

diff --git a/contrib/gana b/contrib/gana
index 97024d52..b4f19c29 160000
--- a/contrib/gana
+++ b/contrib/gana
@@ -1 +1 @@
-Subproject commit 97024d5261eec7f15940e88f7d5e88fe6a6d2cd0
+Subproject commit b4f19c293a070aeecfe114206952983f68e832ef
diff --git a/src/auditor/generate-auditor-basedb.conf 
b/src/auditor/generate-auditor-basedb.conf
index bcdc3186..233cfbe7 100644
--- a/src/auditor/generate-auditor-basedb.conf
+++ b/src/auditor/generate-auditor-basedb.conf
@@ -24,6 +24,21 @@ LEGAL_RESERVE_EXPIRATION_TIME = 4 weeks
 AGGREGATOR_SHIFT = 1 s
 DEFAULT_PURSE_LIMIT = 1
 
+[libeufin-bank]
+CURRENCY = TESTKUDOS
+DEFAULT_CUSTOMER_DEBT_LIMIT = TESTKUDOS:200
+DEFAULT_ADMIN_DEBT_LIMIT = TESTKUDOS:2000
+REGISTRATION_BONUS_ENABLED = yes
+REGISTRATION_BONUS = TESTKUDOS:100
+SUGGESTED_WITHDRAWAL_EXCHANGE = http://localhost:8081/
+WIRE_TYPE = iban
+IBAN_PAYTO_BIC = SANDBOXX
+SERVE = tcp
+PORT = 8082
+
+[libeufin-bankdb-postgres]
+CONFIG = postgresql:///auditor-basedb
+
 [exchangedb-postgres]
 CONFIG = postgres:///auditor-basedb
 SQL_DIR = $DATADIR/sql/exchange/
@@ -91,7 +106,7 @@ REGISTRATION_BONUS_ENABLED = yes
 REGISTRATION_BONUS = TESTKUDOS:100
 SUGGESTED_WITHDRAWAL_EXCHANGE = http://localhost:8081/
 SERVE = tcp
-PORT = 8082 
+PORT = 8082
 
 [auditor]
 BASE_URL = http://localhost:8083/
diff --git a/src/auditor/generate-auditor-basedb.sh 
b/src/auditor/generate-auditor-basedb.sh
index f2531223..0ca96be4 100755
--- a/src/auditor/generate-auditor-basedb.sh
+++ b/src/auditor/generate-auditor-basedb.sh
@@ -47,7 +47,6 @@ echo -n "Testing for curl ..."
 curl --help >/dev/null </dev/null || exit_skip " MISSING"
 echo " FOUND"
 
-
 # reset database
 echo -n "Reset 'auditor-basedb' database at $PGHOST ..."
 dropdb "auditor-basedb" >/dev/null 2>/dev/null || true
@@ -64,10 +63,21 @@ EXCHANGE_URL=$(taler-config -c "$CONF" -s EXCHANGE -o 
BASE_URL)
 MERCHANT_PORT=$(taler-config -c "$CONF" -s MERCHANT -o PORT)
 MERCHANT_URL="http://localhost:${MERCHANT_PORT}/";
 BANK_PORT=$(taler-config -c "$CONF" -s BANK -o HTTP_PORT)
-BANK_URL="http://localhost:1${BANK_PORT}";
-
+BANK_URL="http://localhost:${BANK_PORT}";
+
+echo -n "Checking setup worked ..."
+wget \
+    --tries=1 \
+    --timeout=1 \
+    "${EXCHANGE_URL}config" \
+    -o /dev/null \
+    -O /dev/null >/dev/null
+echo "DONE"
+
+export MERCHANT_URL
 echo -n "Setting up merchant ..."
-curl -H "Content-Type: application/json" -X POST -d 
'{"auth":{"method":"external"},"accounts":[{"payto_uri":"payto://iban/SANDBOXX/DE474361?receiver-name=Merchant43"}],"id":"default","name":"default","address":{},"jurisdiction":{},"default_max_wire_fee":"TESTKUDOS:1",
 
"default_max_deposit_fee":"TESTKUDOS:1","default_wire_fee_amortization":1,"default_wire_transfer_delay":{"d_us"
 : 3600000000},"default_pay_delay":{"d_us": 3600000000}}' 
"${MERCHANT_URL}management/instances"
+
+curl -H "Content-Type: application/json" -X POST -d 
'{"auth":{"method":"external"},"accounts":[{"payto_uri":"payto://iban/SANDBOXX/DE474361?receiver-name=Merchant43"}],"id":"default","name":"default","address":{},"jurisdiction":{},"default_max_wire_fee":"TESTKUDOS:1",
 
"default_max_deposit_fee":"TESTKUDOS:1","default_wire_fee_amortization":1,"default_wire_transfer_delay":{"d_us"
 : 3600000000},"default_pay_delay":{"d_us": 3600000000},"use_stefan":false}' 
"${MERCHANT_URL}management/instances"
 echo " DONE"
 
 # delete existing wallet database
@@ -91,7 +101,7 @@ taler-wallet-cli \
     }' \
     --arg MERCHANT_URL "$MERCHANT_URL" \
     --arg EXCHANGE_URL "$EXCHANGE_URL" \
-    --arg BANK_URL "$BANK_URL/demobanks/default/access-api/"
+    --arg BANK_URL "$BANK_URL"
   )" &> taler-wallet-cli.log
 echo " DONE"
 
diff --git a/src/auditor/generate-revoke-basedb.sh 
b/src/auditor/generate-revoke-basedb.sh
index 49f504d1..29aa74b2 100755
--- a/src/auditor/generate-revoke-basedb.sh
+++ b/src/auditor/generate-revoke-basedb.sh
@@ -32,12 +32,12 @@ EXCHANGE_URL=$(taler-config -c "$CONF" -s EXCHANGE -o 
BASE_URL)
 MERCHANT_PORT=$(taler-config -c "$CONF" -s MERCHANT -o PORT)
 MERCHANT_URL="http://localhost:${MERCHANT_PORT}/";
 BANK_PORT=$(taler-config -c "$CONF" -s BANK -o HTTP_PORT)
-BANK_URL="http://localhost:1${BANK_PORT}";
+BANK_URL="http://localhost:${BANK_PORT}";
 
 
 # Setup merchant
 echo -n "Setting up merchant ..."
-curl -H "Content-Type: application/json" -X POST -d '{"auth": {"method": 
"external"}, 
"accounts":[{"payto_uri":"payto://iban/SANDBOXX/DE474361?receiver-name=Merchant43"}],"id":"default","name":"default","address":{},"jurisdiction":{},"default_max_wire_fee":"TESTKUDOS:1",
 
"default_max_deposit_fee":"TESTKUDOS:1","default_wire_fee_amortization":1,"default_wire_transfer_delay":{"d_us"
 : 3600000000},"default_pay_delay":{"d_us": 3600000000}}' 
"${MERCHANT_URL}management/instances"
+curl -H "Content-Type: application/json" -X POST -d '{"auth": {"method": 
"external"}, 
"accounts":[{"payto_uri":"payto://iban/SANDBOXX/DE474361?receiver-name=Merchant43"}],"id":"default","name":"default","address":{},"jurisdiction":{},"default_max_wire_fee":"TESTKUDOS:1",
 
"default_max_deposit_fee":"TESTKUDOS:1","default_wire_fee_amortization":1,"default_wire_transfer_delay":{"d_us"
 : 3600000000},"default_pay_delay":{"d_us": 3600000000},"use_stefan":true}' 
"${MERCHANT_URL}management/instances"
 echo " DONE"
 
 
@@ -58,7 +58,7 @@ taler-wallet-cli \
       corebankApiBaseUrl: $BANK_URL,
       exchangeBaseUrl: $EXCHANGE_URL,
     }' \
-    --arg BANK_URL "$BANK_URL/demobanks/default/access-api/" \
+    --arg BANK_URL "$BANK_URL" \
     --arg EXCHANGE_URL "$EXCHANGE_URL"
   )" &> taler-wallet-cli-withdraw.log
 
diff --git a/src/auditor/setup.sh b/src/auditor/setup.sh
index eb8a784e..1ac8980a 100755
--- a/src/auditor/setup.sh
+++ b/src/auditor/setup.sh
@@ -35,7 +35,9 @@ function setup()
     exec 3<> "$FIFO_OUT" 4< "$FIFO_OUT"
     rm -rf "$FIFO_DIR"
     # We require '-W' for our termination logic to work.
-    taler-unified-setup.sh -W "$@" >&3 &
+    taler-unified-setup.sh -W "$@" \
+        | tee taler-unified-setup.log \
+        >&3 &
     SETUP_PID=$!
     # Close FD3
     exec 3>&-
diff --git a/src/auditor/test-auditor.sh b/src/auditor/test-auditor.sh
index 65e77b04..4c8389b9 100755
--- a/src/auditor/test-auditor.sh
+++ b/src/auditor/test-auditor.sh
@@ -2228,7 +2228,9 @@ INITDB_BIN=$(command -v initdb) || true
 if [[ -n "$INITDB_BIN" ]]; then
   echo " FOUND (in path) at $INITDB_BIN"
 else
-    HAVE_INITDB=$(find /usr -name "initdb" | head -1 2> /dev/null | grep 
postgres) \
+    HAVE_INITDB=$(find /usr -name "initdb" 2> /dev/null \
+                      | head -1 2> /dev/null \
+                      | grep postgres) \
         || exit_skip " MISSING"
   echo " FOUND at $(dirname "$HAVE_INITDB")"
   INITDB_BIN=$(echo "$HAVE_INITDB" | grep bin/initdb | grep postgres | sort -n 
| tail -n1)
@@ -2244,37 +2246,37 @@ $INITDB_BIN \
     --no-sync \
     --auth=trust \
     -D "${TMPDIR}" \
+    --set listen_addresses='' \
+    --set fsync=off \
+    --set max_wal_senders=0 \
+    --set synchronous_commit=off \
+    --set wal_level=minimal \
+    --set unix_socket_directories="${TMPDIR}/sockets" \
     > "${MY_TMP_DIR}/postgres-dbinit.log" \
     2> "${MY_TMP_DIR}/postgres-dbinit.err"
 echo "DONE"
 SOCKETDIR="${TMPDIR}/sockets"
 mkdir "${SOCKETDIR}"
+
 echo -n "Launching Postgres service"
-cat - >> "$TMPDIR/postgresql.conf" <<EOF
-unix_socket_directories='${TMPDIR}/sockets'
-fsync=off
-max_wal_senders=0
-synchronous_commit=off
-wal_level=minimal
-listen_addresses=''
-EOF
+# Unix domain socket is NOT yet supported by libeufin!
 grep -v host \
      < "$TMPDIR/pg_hba.conf" \
      > "$TMPDIR/pg_hba.conf.new"
 mv "$TMPDIR/pg_hba.conf.new" "$TMPDIR/pg_hba.conf"
 "${POSTGRES_PATH}/pg_ctl" \
                 -D "$TMPDIR" \
-                -l /dev/null \
+                -l "${MY_TMP_DIR}/postgres.log" \
                 start \
                 > "${MY_TMP_DIR}/postgres-start.log" \
                 2> "${MY_TMP_DIR}/postgres-start.err"
 echo " DONE"
 PGHOST="$TMPDIR/sockets"
 export PGHOST
-
 MYDIR="${MY_TMP_DIR}/basedb"
 mkdir -p "${MYDIR}"
 echo "Generating fresh database at $MYDIR"
+
 if faketime -f '-1 d' ./generate-auditor-basedb.sh -d "$MYDIR/$DB"
 then
     echo -n "Reset 'auditor-basedb' database at $PGHOST ..."
diff --git a/src/testing/test_exchange_api.conf 
b/src/testing/test_exchange_api.conf
index 45c1fa89..c25f5091 100644
--- a/src/testing/test_exchange_api.conf
+++ b/src/testing/test_exchange_api.conf
@@ -11,6 +11,8 @@ DEFAULT_ADMIN_DEBT_LIMIT = EUR:2000
 REGISTRATION_BONUS_ENABLED = yes
 REGISTRATION_BONUS = EUR:100
 SUGGESTED_WITHDRAWAL_EXCHANGE = http://localhost:8081/
+WIRE_TYPE = iban
+IBAN_PAYTO_BIC = SANDBOXX
 SERVE = tcp
 PORT = 8082
 

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