aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_batch_deposit.c
diff options
context:
space:
mode:
authorÖzgür Kesim <oec-taler@kesim.org>2023-06-10 11:07:06 +0200
committerÖzgür Kesim <oec-taler@kesim.org>2023-06-10 11:07:06 +0200
commit70bfe0ed1b9a5dbb6cc487465ef3c3df4cdb0436 (patch)
tree5f32b30f5b58dfc502c273bebecffbcb79fc3c4b /src/testing/testing_api_cmd_batch_deposit.c
parent46188ae07e97d12b73269167459707844b3c2486 (diff)
parentd8f8c550bd7ad85f9da9bc5edba619e533eabcc8 (diff)
Merge branch 'master' into age-withdraw
Diffstat (limited to 'src/testing/testing_api_cmd_batch_deposit.c')
-rw-r--r--src/testing/testing_api_cmd_batch_deposit.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/src/testing/testing_api_cmd_batch_deposit.c b/src/testing/testing_api_cmd_batch_deposit.c
index d3275875..6a05071a 100644
--- a/src/testing/testing_api_cmd_batch_deposit.c
+++ b/src/testing/testing_api_cmd_batch_deposit.c
@@ -198,16 +198,8 @@ batch_deposit_cb (void *cls,
ds->dh = NULL;
if (ds->expected_response_code != dr->hr.http_status)
{
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Unexpected response code %u to command %s in %s:%u\n",
- dr->hr.http_status,
- ds->is->commands[ds->is->ip].label,
- __FILE__,
- __LINE__);
- json_dumpf (dr->hr.reply,
- stderr,
- JSON_INDENT (2));
- TALER_TESTING_interpreter_fail (ds->is);
+ TALER_TESTING_unexpected_status (ds->is,
+ dr->hr.http_status);
return;
}
if (MHD_HTTP_OK == dr->hr.http_status)
@@ -259,8 +251,12 @@ batch_deposit_run (void *cls,
&wire_salt),
GNUNET_JSON_spec_end ()
};
+ struct TALER_EXCHANGE_Handle *exchange
+ = TALER_TESTING_get_exchange (is);
(void) cmd;
+ if (NULL == exchange)
+ return;
memset (cdds,
0,
sizeof (cdds));
@@ -387,7 +383,7 @@ batch_deposit_run (void *cls,
.refund_deadline = ds->refund_deadline
};
- ds->dh = TALER_EXCHANGE_batch_deposit (is->exchange,
+ ds->dh = TALER_EXCHANGE_batch_deposit (exchange,
&dcd,
ds->num_coins,
cdds,
@@ -422,10 +418,8 @@ batch_deposit_cleanup (void *cls,
if (NULL != ds->dh)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "Command %u (%s) did not complete\n",
- ds->is->ip,
- cmd->label);
+ TALER_TESTING_command_incomplete (ds->is,
+ cmd->label);
TALER_EXCHANGE_batch_deposit_cancel (ds->dh);
ds->dh = NULL;
}