diff options
author | Matyja Lukas Adam <lukas.matyja@students.bfh.ch> | 2024-01-07 21:14:06 +0100 |
---|---|---|
committer | Matyja Lukas Adam <lukas.matyja@students.bfh.ch> | 2024-01-07 21:14:06 +0100 |
commit | 2b41bb8f388fa2b99cc9b1715cd9689bdd6b85a7 (patch) | |
tree | ca4c680b2cfa18b0c960b83ec0d70fccd1f5fb79 | |
parent | a0cea55ac4a485e1b552e482ea2f59d6426287f1 (diff) | |
download | exchange-2b41bb8f388fa2b99cc9b1715cd9689bdd6b85a7.tar.xz |
[testing] add DONAU to unified setup
-rwxr-xr-x | src/testing/taler-unified-setup.sh | 33 | ||||
-rw-r--r-- | src/testing/test_donau_api.conf | 37 |
2 files changed, 69 insertions, 1 deletions
diff --git a/src/testing/taler-unified-setup.sh b/src/testing/taler-unified-setup.sh index 0eb7a1c49..ee21ac617 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_DONAU=0 START_CHALLENGER=0 START_AGGREGATOR=0 START_MERCHANT=0 @@ -83,7 +84,7 @@ LOGLEVEL="DEBUG" DEFAULT_SLEEP="0.2" # Parse command-line options -while getopts ':abc:d:efghkL:mMnr:stu:vwW' OPTION; do +while getopts ':abc:d:efghkL:mMnr:stu:vwWD' OPTION; do case "$OPTION" in a) START_AUDITOR="1" @@ -97,6 +98,9 @@ while getopts ':abc:d:efghkL:mMnr:stu:vwW' OPTION; do d) WIRE_DOMAIN="$OPTARG" ;; + D) + START_DONAU="1" + ;; e) START_EXCHANGE="1" ;; @@ -111,6 +115,7 @@ while getopts ':abc:d:efghkL:mMnr:stu:vwW' OPTION; do echo ' -c $CONF -- set configuration' # shellcheck disable=SC2016 echo ' -d $METHOD -- use wire method (default: x-taler-bank)' + echo ' -D -- start donau' echo ' -e -- start exchange' echo ' -f -- start fakebank' echo ' -g -- start aggregator' @@ -192,6 +197,13 @@ then echo " FOUND" fi +if [ "1" = "$START_DONAU" ] +then + echo -n "Testing for Donau" + donau-httpd -h > /dev/null || exit_skip " donau-httpd required" + echo " FOUND" +fi + if [ "1" = "$START_MERCHANT" ] then echo -n "Testing for Taler merchant" @@ -470,6 +482,25 @@ then echo " DONE" fi +if [ "1" = "$START_DONAU" ] +then + echo -n "Starting Donau ..." + DONAU_PORT=$(donau-config -c "$CONF" -s DONAU -o PORT) + SERVE=$(donau-config -c "$CONF" -s DONAU -o SERVE) + if [ "${SERVE}" = "unix" ] + then + DONAU_URL=$(donau-config -c "$CONF" -s DONAU -o BASE_URL) + else + DONAU_URL="http://localhost:${DONAU_PORT}/" + fi + donau-dbinit -c "$CONF" --reset + $USE_VALGRIND taler-secmod-eddsa -c "$CONF" -L "$LOGLEVEL" -s donau 2> donau-secmod-eddsa.log & + $USE_VALGRIND taler-secmod-rsa -c "$CONF" -L "$LOGLEVEL" -s donau 2> donau-secmod-rsa.log & + $USE_VALGRIND taler-secmod-cs -c "$CONF" -L "$LOGLEVEL" -s donau 2> donau-secmod-cs.log & + $USE_VALGRIND donau-httpd -c "$CONF" -L "$LOGLEVEL" 2> donau-httpd.log & + echo " DONE" +fi + if [ "1" = "$START_WIREWATCH" ] then echo -n "Starting wirewatch ..." diff --git a/src/testing/test_donau_api.conf b/src/testing/test_donau_api.conf new file mode 100644 index 000000000..26f5cd071 --- /dev/null +++ b/src/testing/test_donau_api.conf @@ -0,0 +1,37 @@ +# This file is in the public domain. +# +@INLINE@ coins-rsa.conf + +[PATHS] +TALER_TEST_HOME = test_donau_api_home/ + +[taler] +CURRENCY = EUR +CURRENCY_ROUND_UNIT = EUR:0.01 + +[donau] +TERMS_ETAG = tos +PRIVACY_ETAG = 0 +PORT = 8081 +DB = postgres +BASE_URL = "http://localhost:8081/" +SERVE = tcp +EXPIRE_IDLE_SLEEP_INTERVAL ="1 s" +MAX_KEYS_CACHING = forever + +[donaudb-postgres] +CONFIG = "postgres:///talercheck" + +[donaudb] +# IDLE_RESERVE_EXPIRATION_TIME = 0 s + +[taler-donau-secmod-cs] +LOOKAHEAD_SIGN = "24 days" + +[taler-donau-secmod-rsa] +LOOKAHEAD_SIGN = "24 days" + +[taler-donau-secmod-eddsa] +LOOKAHEAD_SIGN = "24 days" +DURATION = "14 days" + |