diff options
Diffstat (limited to 'src/testing/testing_api_cmd_kyc_check_get.c')
-rw-r--r-- | src/testing/testing_api_cmd_kyc_check_get.c | 46 |
1 files changed, 20 insertions, 26 deletions
diff --git a/src/testing/testing_api_cmd_kyc_check_get.c b/src/testing/testing_api_cmd_kyc_check_get.c index 3241aae3e..25c7e98b8 100644 --- a/src/testing/testing_api_cmd_kyc_check_get.c +++ b/src/testing/testing_api_cmd_kyc_check_get.c @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2021 Taler Systems SA + Copyright (C) 2021-2023 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 @@ -73,19 +73,13 @@ check_kyc_cb (void *cls, { struct KycCheckGetState *kcg = cls; struct TALER_TESTING_Interpreter *is = kcg->is; - struct TALER_TESTING_Command *cmd = &is->commands[is->ip]; kcg->kwh = NULL; if (kcg->expected_response_code != ks->http_status) { - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Unexpected response code %u/%d to command %s in %s:%u\n", - ks->http_status, - (int) ks->ec, - cmd->label, - __FILE__, - __LINE__); - TALER_TESTING_interpreter_fail (is); + TALER_TESTING_unexpected_status (is, + ks->http_status, + kcg->expected_response_code); return; } switch (ks->http_status) @@ -124,9 +118,9 @@ check_kyc_run (void *cls, (void) cmd; kcg->is = is; - res_cmd = TALER_TESTING_interpreter_lookup_command (kcg->is, - kcg-> - payment_target_reference); + res_cmd = TALER_TESTING_interpreter_lookup_command ( + kcg->is, + kcg->payment_target_reference); if (NULL == res_cmd) { GNUNET_break (0); @@ -155,13 +149,16 @@ check_kyc_run (void *cls, TALER_TESTING_interpreter_fail (kcg->is); return; } - kcg->kwh = TALER_EXCHANGE_kyc_check (is->exchange, - *requirement_row, - h_payto, - TALER_KYCLOGIC_KYC_UT_INDIVIDUAL, - GNUNET_TIME_UNIT_SECONDS, - &check_kyc_cb, - kcg); + kcg->kwh = TALER_EXCHANGE_kyc_check ( + TALER_TESTING_interpreter_get_context (is), + TALER_TESTING_get_exchange_url (is), + TALER_TESTING_get_keys (is), + *requirement_row, + h_payto, + TALER_KYCLOGIC_KYC_UT_INDIVIDUAL, + GNUNET_TIME_UNIT_SECONDS, + &check_kyc_cb, + kcg); GNUNET_assert (NULL != kcg->kwh); } @@ -181,10 +178,8 @@ check_kyc_cleanup (void *cls, if (NULL != kcg->kwh) { - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, - "Command %u (%s) did not complete\n", - kcg->is->ip, - cmd->label); + TALER_TESTING_command_incomplete (kcg->is, + cmd->label); TALER_EXCHANGE_kyc_check_cancel (kcg->kwh); kcg->kwh = NULL; } @@ -210,8 +205,7 @@ check_kyc_traits (void *cls, { struct KycCheckGetState *kcg = cls; struct TALER_TESTING_Trait traits[] = { - TALER_TESTING_make_trait_kyc_url ( - (const char **) &kcg->kyc_url), + TALER_TESTING_make_trait_kyc_url (kcg->kyc_url), TALER_TESTING_trait_end () }; |