anastasis

Credential backup and recovery protocol and service
Log | Files | Refs | Submodules | README | LICENSE

commit 269df8d4090558f28ab25ef4a4f7cf060359a90e
parent 9581338a2b574f977c518bd4944f58a8ce965de3
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun,  8 Dec 2024 20:29:17 +0100

-some fixes for Taler v0.14

Diffstat:
Msrc/cli/test_anastasis_reducer_backup_enter_user_attributes.sh | 14+++++++-------
Msrc/cli/test_anastasis_reducer_enter_secret.sh | 3++-
Msrc/cli/test_anastasis_reducer_recovery_enter_user_attributes.sh | 3++-
Msrc/cli/test_anastasis_reducer_recovery_hanging.sh | 4++--
Msrc/cli/test_free_reducer.conf | 3+--
Msrc/cli/test_reducer.conf | 1+
Msrc/stasis/plugin_anastasis_postgres.c | 4++--
Msrc/stasis/test_anastasis_db_postgres.conf | 2--
8 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/cli/test_anastasis_reducer_backup_enter_user_attributes.sh b/src/cli/test_anastasis_reducer_backup_enter_user_attributes.sh @@ -18,7 +18,7 @@ function exit_fail() { # Cleanup to run whenever we exit function cleanup() { - for n in `jobs -p` + for n in $(jobs -p) do kill $n 2> /dev/null || true done @@ -29,7 +29,7 @@ CONF_1="test_anastasis_reducer_1.conf" CONF_2="test_anastasis_reducer_2.conf" CONF_3="test_anastasis_reducer_3.conf" CONF_4="test_anastasis_reducer_4.conf" -TFILE=`mktemp test_reducer_stateXXXXXX` +TFILE=$(mktemp test_reducer_stateXXXXXX) # Install cleanup handler (except for kill -9) trap cleanup EXIT @@ -79,7 +79,7 @@ anastasis-httpd -c $CONF_3 2> anastasis-httpd_3.log & anastasis-httpd -c $CONF_4 2> anastasis-httpd_4.log & # Wait for anastasis service to be available -for n in `seq 1 50` +for n in $(seq 1 50) do echo -n "." sleep 0.1 @@ -110,15 +110,15 @@ anastasis-reducer -L WARNING -a \ "full_name": "Max Musterman", "sq_number": "4", "birthdate": "2000-01-01"}}' \ - enter_user_attributes resources/02-backup.json $TFILE + enter_user_attributes resources/02-backup.json "$TFILE" -STATE=`jq -r -e .backup_state < $TFILE` +STATE=$(jq -r -e .backup_state < "$TFILE") if test "$STATE" != "AUTHENTICATIONS_EDITING" then exit_fail "Expected new state to be 'AUTHENTICATIONS_EDITING', got '$STATE'" fi -SELECTED_COUNTRY=`jq -r -e .selected_country < $TFILE` +SELECTED_COUNTRY=$(jq -r -e .selected_country < "$TFILE") if test "$SELECTED_COUNTRY" != "xx" then exit_fail "Expected selected country to be 'xx', got '$SELECTED_COUNTRY'" @@ -126,6 +126,6 @@ fi echo "OK" -rm -f $TFILE +rm -f "$TFILE" exit 0 diff --git a/src/cli/test_anastasis_reducer_enter_secret.sh b/src/cli/test_anastasis_reducer_enter_secret.sh @@ -52,7 +52,8 @@ echo " FOUND" # Launch exchange, merchant and bank. # shellcheck disable=SC2086 setup -c "test_reducer.conf" \ - -aemw \ + -emw \ + -r merchant-exchange-default \ $BANK_FLAGS diff --git a/src/cli/test_anastasis_reducer_recovery_enter_user_attributes.sh b/src/cli/test_anastasis_reducer_recovery_enter_user_attributes.sh @@ -47,7 +47,8 @@ echo " FOUND" # Launch exchange, merchant and bank. # shellcheck disable=SC2086 setup -c "test_reducer.conf" \ - -aemw \ + -emw \ + -r merchant-exchange-default \ $BANK_FLAGS # Cleanup to run whenever we exit diff --git a/src/cli/test_anastasis_reducer_recovery_hanging.sh b/src/cli/test_anastasis_reducer_recovery_hanging.sh @@ -20,7 +20,7 @@ function exit_fail() { # Cleanup to run whenever we exit function cleanup() { - for n in `jobs -p` + for n in $(jobs -p) do kill -SIGCONT $n # in case suspended... kill $n 2> /dev/null || true @@ -69,7 +69,7 @@ CONF_4="test_anastasis_reducer_free_4.conf" # Configuration file will be edited, so we create one # from the template. -CONF=`mktemp test_reducerXXXXXX.conf` +CONF=$(mktemp test_reducerXXXXXX.conf) cp test_reducer.conf $CONF TMP_DIR=`mktemp -d keys-tmp-XXXXXX` diff --git a/src/cli/test_free_reducer.conf b/src/cli/test_free_reducer.conf @@ -1,9 +1,8 @@ # This file is in the public domain. # It is used by test_iban.sh -[taler] -CURRENCY = EUR [anastasis] +CURRENCY = EUR DB = postgres ANNUAL_FEE = EUR:0 TRUTH_UPLOAD_FEE = EUR:0 diff --git a/src/cli/test_reducer.conf b/src/cli/test_reducer.conf @@ -7,6 +7,7 @@ TALER_CACHE_HOME = $TALER_HOME/.cache/taler/ TALER_RUNTIME_DIR = ${TMPDIR:-${TMP:-/tmp}}/${USER:-}/taler-system-runtime/ [anastasis] +CURRENCY = TESTKUDOS DB = postgres ANNUAL_FEE = TESTKUDOS:4.99 TRUTH_UPLOAD_FEE = TESTKUDOS:0.01 diff --git a/src/stasis/plugin_anastasis_postgres.c b/src/stasis/plugin_anastasis_postgres.c @@ -2902,12 +2902,12 @@ libanastasis_plugin_db_postgres_init (void *cls) pg->cfg = cfg; if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, - "taler", + "anastasis", "CURRENCY", &pg->currency)) { GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, - "taler", + "anastasis", "CURRENCY"); GNUNET_PQ_disconnect (pg->conn); GNUNET_free (pg); diff --git a/src/stasis/test_anastasis_db_postgres.conf b/src/stasis/test_anastasis_db_postgres.conf @@ -1,8 +1,6 @@ [anastasis] #The DB plugin to use DB = postgres - -[taler] CURRENCY = EUR [stasis-postgres]