summaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_recoup_refresh.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-06-07 23:11:05 +0200
committerChristian Grothoff <christian@grothoff.org>2023-06-07 23:11:05 +0200
commita2dde02b64a8ee75c9243632eb45a6ceb9b62dd5 (patch)
tree378cb6aefaf7f00894a7c8916fad9c3de84e31b4 /src/testing/testing_api_cmd_recoup_refresh.c
parent015b08b0489d72f3fda587eec900bc4193a6a57e (diff)
downloadexchange-a2dde02b64a8ee75c9243632eb45a6ceb9b62dd5.tar.gz
exchange-a2dde02b64a8ee75c9243632eb45a6ceb9b62dd5.tar.bz2
exchange-a2dde02b64a8ee75c9243632eb45a6ceb9b62dd5.zip
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_refresh.c')
-rw-r--r--src/testing/testing_api_cmd_recoup_refresh.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/testing/testing_api_cmd_recoup_refresh.c b/src/testing/testing_api_cmd_recoup_refresh.c
index ff7dab004..1c7456c73 100644
--- a/src/testing/testing_api_cmd_recoup_refresh.c
+++ b/src/testing/testing_api_cmd_recoup_refresh.c
@@ -82,25 +82,14 @@ recoup_refresh_cb (void *cls,
struct RecoupRefreshState *rrs = cls;
const struct TALER_EXCHANGE_HttpResponse *hr = &rrr->hr;
struct TALER_TESTING_Interpreter *is = rrs->is;
- struct TALER_TESTING_Command *cmd = &is->commands[is->ip];
char *cref;
unsigned int idx;
rrs->ph = NULL;
if (rrs->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;
}
@@ -195,7 +184,11 @@ recoup_refresh_run (void *cls,
const struct TALER_ExchangeWithdrawValues *ewv;
char *cref;
unsigned int idx;
+ struct TALER_EXCHANGE_Handle *exchange
+ = TALER_TESTING_get_exchange (is);
+ if (NULL == exchange)
+ return;
rrs->is = is;
if (GNUNET_OK !=
TALER_TESTING_parse_coin_reference (
@@ -280,7 +273,7 @@ recoup_refresh_run (void *cls,
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Trying to recoup_refresh denomination '%s'\n",
TALER_B2S (&denom_pub->h_key));
- rrs->ph = TALER_EXCHANGE_recoup_refresh (is->exchange,
+ rrs->ph = TALER_EXCHANGE_recoup_refresh (exchange,
denom_pub,
coin_sig,
ewv,