aboutsummaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-11-01 11:35:57 +0100
committerChristian Grothoff <christian@grothoff.org>2023-11-01 11:35:57 +0100
commit3ef88d44302d5855f8bd789d00f03f9f7fd3796b (patch)
treefb050e3f853d82ea9bc8f8b37bf6554173c0164b /src/testing
parentfc7800d320d5508a1bada7dc47d60cc46a96200f (diff)
add option to start challenger service
Diffstat (limited to 'src/testing')
-rwxr-xr-xsrc/testing/taler-unified-setup.sh36
1 files changed, 34 insertions, 2 deletions
diff --git a/src/testing/taler-unified-setup.sh b/src/testing/taler-unified-setup.sh
index 8b3911fd5..9017f872e 100755
--- a/src/testing/taler-unified-setup.sh
+++ b/src/testing/taler-unified-setup.sh
@@ -67,6 +67,7 @@ START_AUDITOR=0
START_BACKUP=0
START_EXCHANGE=0
START_FAKEBANK=0
+START_CHALLENGER=0
START_AGGREGATOR=0
START_MERCHANT=0
START_NEXUS=0
@@ -81,7 +82,7 @@ LOGLEVEL="DEBUG"
DEFAULT_SLEEP="0.2"
# Parse command-line options
-while getopts ':abc:d:efghL:mnr:stu:vwW' OPTION; do
+while getopts ':abc:d:efghkL:mnr:stu:vwW' OPTION; do
case "$OPTION" in
a)
START_AUDITOR="1"
@@ -130,6 +131,9 @@ while getopts ':abc:d:efghL:mnr:stu:vwW' OPTION; do
g)
START_AGGREGATOR="1"
;;
+ k)
+ START_CHALLENGER="1"
+ ;;
L)
LOGLEVEL="$OPTARG"
;;
@@ -189,6 +193,13 @@ then
echo " FOUND"
fi
+if [ "1" = "$START_CHALLENGER" ]
+then
+ echo -n "Testing for Taler challenger"
+ challenger-httpd -h > /dev/null || exit_skip " challenger-httpd required"
+ echo " FOUND"
+fi
+
if [ "1" = "$START_BACKUP" ]
then
echo -n "Testing for sync-httpd"
@@ -304,7 +315,7 @@ then
exit_skip "Failed to launch services (bank)"
fi
echo "OK"
- echo -n "Set admin password..."
+ echo -n "Set admin password..."
AUSER="admin"
APASS="secret"
libeufin-bank \
@@ -485,6 +496,16 @@ then
echo " DONE"
fi
+if [ "1" = "$START_CHALLENGER" ]
+then
+ echo -n "Starting challenger ..."
+ CHALLENGER_PORT=$(challenger-config -c "$CONF" -s CHALLENGER -o PORT)
+ CHALLENGER_URL="http://localhost:${CHALLENGER_PORT}/"
+ challenger-dbinit -c "$CONF" --reset
+ $USE_VALGRIND challenger-httpd -c "$CONF" -L "$LOGLEVEL" 2> challenger-httpd.log &
+ echo " DONE"
+fi
+
if [ "1" = "$START_AUDITOR" ]
then
@@ -550,6 +571,17 @@ do
-O /dev/null >/dev/null || continue
S_DONE=1
fi
+ if [ "0" = "$S_DONE" ] && [ "1" = "$START_CHALLENGER" ]
+ then
+ echo -n "S"
+ wget \
+ --tries=1 \
+ --timeout=1 \
+ "${CHALLENGER_URL}config" \
+ -o /dev/null \
+ -O /dev/null >/dev/null || continue
+ S_DONE=1
+ fi
if [ "0" = "$A_DONE" ] && [ "1" = "$START_AUDITOR" ]
then
echo -n "A"