merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit e89196cb4a857cae370b48d55a51cd7b6b6e752f
parent db019222aa07ce57b3044de741c4bc6806c54c7c
Author: Christian Grothoff <christian@grothoff.org>
Date:   Thu, 22 Jun 2023 17:25:02 +0200

-work on wirewatch test

Diffstat:
Msrc/testing/Makefile.am | 3++-
Msrc/testing/test_merchant_order_creation.sh | 3+++
Msrc/testing/test_merchant_wirewatch.sh | 17+++++++++++++----
3 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/src/testing/Makefile.am b/src/testing/Makefile.am @@ -19,7 +19,8 @@ check_SCRIPTS = \ test_merchant_transfer_tracking.sh \ test_merchant_kyc.sh \ test_merchant_order_autocleanup.sh -# test_merchant_wirewatch.sh <= convert! +# test_merchant_wirewatch.sh <= get to run! +# test_key_rotation.sh <= ??? lib_LTLIBRARIES = \ diff --git a/src/testing/test_merchant_order_creation.sh b/src/testing/test_merchant_order_creation.sh @@ -33,11 +33,14 @@ taler-wallet-cli --no-throttle --wallet-db="$WALLET_DB" api --expect-success 'wi --arg EXCHANGE_URL "$EXCHANGE_URL" )" 2>wallet-withdraw-1.err >wallet-withdraw-1.out # FIXME-MS: add logic to have nexus check immediately here. +echo -n "." sleep 10 +echo -n "." # NOTE: once libeufin can do long-polling, we should # be able to reduce the delay here and run wirewatch # always in the background via setup taler-exchange-wirewatch -L "INFO" -c "$CONF" -t &> taler-exchange-wirewatch.out +echo -n "." taler-wallet-cli --wallet-db="$WALLET_DB" run-until-done 2>wallet-withdraw-finish-1.err >wallet-withdraw-finish-1.out echo " OK" diff --git a/src/testing/test_merchant_wirewatch.sh b/src/testing/test_merchant_wirewatch.sh @@ -32,7 +32,7 @@ EXCHANGE_URL="http://localhost:8081/" export LIBEUFIN_SANDBOX_DB_CONNECTION="jdbc:sqlite:libeufin-sandbox.sqlite3" export LIBEUFIN_SANDBOX_ADMIN_PASSWORD="secret" -export LIBEUFIN_SANDBOX_URL="http://localhost:1${NEXUS_PORT}/" +export LIBEUFIN_SANDBOX_URL="http://localhost:18082/" export EBICS_HOST="talerebics" export LIBEUFIN_SANDBOX_USERNAME="admin" @@ -46,7 +46,7 @@ export NEXUS_ACCOUNT_NAME="GnunetCredit" # the 'default' instance, so this must be used here. export SANDBOX_ACCOUNT_NAME="gnunet" -export LIBEUFIN_NEXUS_URL="http://localhost:${NEXUS_PORT}" +export LIBEUFIN_NEXUS_URL="http://localhost:8082" # These two are from taler-bank-manage-testing... # Make credit user, will be Merchant client. @@ -59,7 +59,7 @@ CREDIT_PASSWORD=$(taler-config -c "$CONF" \ echo -n "Create credit user (for gnunet-merchant) at Nexus ..." -export LIBEUFIN_NEXUS_DB_CONNECTION="jdbc:sqlite:${TALER_DB}" +export LIBEUFIN_NEXUS_DB_CONNECTION="jdbc:sqlite:libeufin-nexus.sqlite3" libeufin-nexus \ superuser "$CREDIT_USERNAME" \ --password="$CREDIT_PASSWORD" \ @@ -81,7 +81,7 @@ libeufin-cli sandbox \ libeufin-cli \ connections \ new-ebics-connection \ - --ebics-url="${SANDBOX_URL}/ebicsweb" \ + --ebics-url="${LIBEUFIN_SANDBOX_URL}ebicsweb" \ --host-id=${EBICS_HOST} \ --partner-id=${EBICS_PARTNER} \ --ebics-user-id=${NEXUS_ACCOUNT_NAME} \ @@ -143,6 +143,15 @@ taler-wallet-cli \ --arg BANK_ACCESS_API_URL "$BANK_URL/access-api/" \ --arg EXCHANGE_URL "$EXCHANGE_URL" )" 2>wallet-withdraw-1.err >wallet-withdraw-1.out +# FIXME-MS: add logic to have nexus check immediately here. +echo -n "." +sleep 10 +# NOTE: once libeufin can do long-polling, we should +# be able to reduce the delay here and run wirewatch +# always in the background via setup +echo -n "." +taler-exchange-wirewatch -L "INFO" -c "$CONF" -t &> taler-exchange-wirewatch.out +echo -n "." taler-wallet-cli \ --wallet-db="$WALLET_DB" \ run-until-done \