exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 366524f890d5f1d34a58e6cbc8f7f8095312e4f4
parent fb5098a7a89636ac4d9944302a3be5c6597a483f
Author: Christian Grothoff <christian@grothoff.org>
Date:   Thu, 11 Jun 2026 01:13:15 +0200

fix KYC test

Diffstat:
Msrc/exchange/taler-exchange-httpd_post-kyc-upload-ID.c | 9++++++---
Msrc/kyclogic/taler-exchange-helper-measure-test-form | 4++--
Msrc/testing/test_kyc_api.c | 9++++++++-
3 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/src/exchange/taler-exchange-httpd_post-kyc-upload-ID.c b/src/exchange/taler-exchange-httpd_post-kyc-upload-ID.c @@ -412,10 +412,13 @@ transact (void *cls, GNUNET_assert (NULL != form_id); /* checked earlier */ if (0 != - strcmp (form_id, - form_name)) + strcmp (form_name, + form_id)) { - GNUNET_break_op (0); + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Expected form `%s', got `%s'\n", + form_name, + form_id); *mhd_ret = TALER_MHD_reply_with_error ( rc->connection, MHD_HTTP_CONFLICT, diff --git a/src/kyclogic/taler-exchange-helper-measure-test-form b/src/kyclogic/taler-exchange-helper-measure-test-form @@ -89,8 +89,8 @@ A=$(jq -r .attributes) # Get form ID FORM_ID=$(echo "$A" | jq -r '.FORM_ID') -# The 'form' here should be the 'test' form -if [ "$FORM_ID" != "test" ] +# The 'form' here should be the 'full_name_and_birthdate' form +if [ "$FORM_ID" != "full_name_and_birthdate" ] then exit_fail "Invalid form ID" fi diff --git a/src/testing/test_kyc_api.c b/src/testing/test_kyc_api.c @@ -755,11 +755,18 @@ run (void *cls, "check-kyc-form", MHD_HTTP_OK), TALER_TESTING_cmd_post_kyc_form ( + "wallet-post-kyc-wrong-form", + "get-kyc-info-form", + 0, /* requirement index */ + "application/json", + "{\"FORM_ID\":\"wrong\",\"FULL_NAME\":\"Bob\",\"DATE_OF_BIRTH\":\"1990-00-00\"}", + MHD_HTTP_CONFLICT), + TALER_TESTING_cmd_post_kyc_form ( "wallet-post-kyc-form", "get-kyc-info-form", 0, /* requirement index */ "application/json", - "{\"FORM_ID\":\"test\",\"FULL_NAME\":\"Bob\",\"DATE_OF_BIRTH\":\"1990-00-00\"}", + "{\"FORM_ID\":\"full_name_and_birthdate\",\"FULL_NAME\":\"Bob\",\"DATE_OF_BIRTH\":\"1990-00-00\"}", MHD_HTTP_NO_CONTENT), /* now this should be allowed */ TALER_TESTING_cmd_wallet_kyc_get (