From a0cea55ac4a485e1b552e482ea2f59d6426287f1 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 6 Jan 2024 20:23:18 +0100 Subject: add logic to launch merchant-depositcheck --- src/exchangedb/exchange_do_amount_specific.sql | 18 ++++++++++++++++-- src/testing/taler-unified-setup.sh | 17 +++++++++++++++-- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/src/exchangedb/exchange_do_amount_specific.sql b/src/exchangedb/exchange_do_amount_specific.sql index e8f60f40d..9b305a3ec 100644 --- a/src/exchangedb/exchange_do_amount_specific.sql +++ b/src/exchangedb/exchange_do_amount_specific.sql @@ -1,3 +1,19 @@ +-- +-- This file is part of TALER +-- Copyright (C) 2014--2022 Taler Systems SA +-- +-- TALER is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 3, or (at your option) any later version. +-- +-- TALER is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +-- A PARTICULAR PURPOSE. See the GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License along with +-- TALER; see the file COPYING. If not, see +-- + -------------------------------------------------------------- -- Taler amounts and helper functions ------------------------------------------------------------- @@ -74,5 +90,3 @@ END $$; COMMENT ON FUNCTION amount_left_minus_right IS 'Subtracts the right amount from the left and returns the difference and TRUE, if the left amount is larger than the right, or an invalid amount and FALSE otherwise.'; - - diff --git a/src/testing/taler-unified-setup.sh b/src/testing/taler-unified-setup.sh index 155dff729..0eb7a1c49 100755 --- a/src/testing/taler-unified-setup.sh +++ b/src/testing/taler-unified-setup.sh @@ -1,7 +1,7 @@ #!/bin/bash # # This file is part of TALER -# Copyright (C) 2023 Taler Systems SA +# Copyright (C) 2023, 2024 Taler Systems SA # # TALER is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as @@ -74,6 +74,7 @@ START_NEXUS=0 START_BANK=0 START_TRANSFER=0 START_WIREWATCH=0 +START_DEPOSITCHECK=0 USE_ACCOUNT="exchange-account-1" USE_VALGRIND="" WIRE_DOMAIN="x-taler-bank" @@ -82,7 +83,7 @@ LOGLEVEL="DEBUG" DEFAULT_SLEEP="0.2" # Parse command-line options -while getopts ':abc:d:efghkL:mnr:stu:vwW' OPTION; do +while getopts ':abc:d:efghkL:mMnr:stu:vwW' OPTION; do case "$OPTION" in a) START_AUDITOR="1" @@ -117,6 +118,7 @@ while getopts ':abc:d:efghkL:mnr:stu:vwW' OPTION; do # shellcheck disable=SC2016 echo ' -L $LOGLEVEL -- set log level' echo ' -m -- start merchant' + echo ' -M -- start merchant-depositcheck' echo ' -n -- start nexus' # shellcheck disable=SC2016 echo ' -r $MEX -- which exchange to use at the merchant (optional)' @@ -126,6 +128,7 @@ while getopts ':abc:d:efghkL:mnr:stu:vwW' OPTION; do echo ' -u $SECTION -- exchange account to use' echo ' -v -- use valgrind' echo ' -w -- start wirewatch' + echo ' -W -- wait for signal' exit 0 ;; g) @@ -140,6 +143,9 @@ while getopts ':abc:d:efghkL:mnr:stu:vwW' OPTION; do m) START_MERCHANT="1" ;; + M) + START_DEPOSITCHECK="1" + ;; n) START_NEXUS="1" ;; @@ -526,9 +532,16 @@ then $USE_VALGRIND taler-merchant-webhook \ -c "$CONF" \ -L "$LOGLEVEL" 2> taler-merchant-webhook.log & + if [ "1" = "$START_DEPOSITCHECK" ] + then + $USE_VALGRIND taler-merchant-depositcheck \ + -c "$CONF" \ + -L "$LOGLEVEL" 2> taler-merchant-depositcheck.log & + fi echo " DONE" fi + if [ "1" = "$START_BACKUP" ] then echo -n "Starting sync ..." -- cgit v1.2.3