diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-06-07 23:11:05 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-06-07 23:11:05 +0200 |
commit | a2dde02b64a8ee75c9243632eb45a6ceb9b62dd5 (patch) | |
tree | 378cb6aefaf7f00894a7c8916fad9c3de84e31b4 /src/testing/testing_api_cmd_recoup.c | |
parent | 015b08b0489d72f3fda587eec900bc4193a6a57e (diff) | |
download | exchange-a2dde02b64a8ee75c9243632eb45a6ceb9b62dd5.tar.xz |
major libtalertesting API refactoring, including no longer having taler-specific logic in the test engine core
Diffstat (limited to 'src/testing/testing_api_cmd_recoup.c')
-rw-r--r-- | src/testing/testing_api_cmd_recoup.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/src/testing/testing_api_cmd_recoup.c b/src/testing/testing_api_cmd_recoup.c index e11475f20..9483b1582 100644 --- a/src/testing/testing_api_cmd_recoup.c +++ b/src/testing/testing_api_cmd_recoup.c @@ -82,7 +82,6 @@ recoup_cb (void *cls, struct RecoupState *ps = cls; const struct TALER_EXCHANGE_HttpResponse *hr = &rr->hr; struct TALER_TESTING_Interpreter *is = ps->is; - struct TALER_TESTING_Command *cmd = &is->commands[is->ip]; const struct TALER_TESTING_Command *reserve_cmd; char *cref; unsigned int idx; @@ -90,18 +89,8 @@ recoup_cb (void *cls, ps->ph = NULL; if (ps->expected_response_code != hr->http_status) { - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Unexpected response code %u/%d to command %s in %s:%u\n", - hr->http_status, - (int) hr->ec, - cmd->label, - __FILE__, - __LINE__); - json_dumpf (hr->reply, - stderr, - 0); - fprintf (stderr, "\n"); - TALER_TESTING_interpreter_fail (is); + TALER_TESTING_unexpected_status (is, + hr->http_status); return; } @@ -193,7 +182,11 @@ recoup_run (void *cls, char *cref; unsigned int idx; const struct TALER_ExchangeWithdrawValues *ewv; + struct TALER_EXCHANGE_Handle *exchange + = TALER_TESTING_get_exchange (is); + if (NULL == exchange) + return; ps->is = is; if (GNUNET_OK != TALER_TESTING_parse_coin_reference ( @@ -266,7 +259,7 @@ recoup_run (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Trying to recoup denomination '%s'\n", TALER_B2S (&denom_pub->h_key)); - ps->ph = TALER_EXCHANGE_recoup (is->exchange, + ps->ph = TALER_EXCHANGE_recoup (exchange, denom_pub, coin_sig, ewv, |