summaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_purse_delete.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/testing_api_cmd_purse_delete.c')
-rw-r--r--src/testing/testing_api_cmd_purse_delete.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/src/testing/testing_api_cmd_purse_delete.c b/src/testing/testing_api_cmd_purse_delete.c
index aa0853274..26037359e 100644
--- a/src/testing/testing_api_cmd_purse_delete.c
+++ b/src/testing/testing_api_cmd_purse_delete.c
@@ -74,16 +74,9 @@ purse_delete_cb (void *cls,
pds->pdh = NULL;
if (pds->expected_response_code != pdr->hr.http_status)
{
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Unexpected response code %u to command %s in %s:%u\n",
- pdr->hr.http_status,
- pds->is->commands[pds->is->ip].label,
- __FILE__,
- __LINE__);
- json_dumpf (pdr->hr.reply,
- stderr,
- 0);
- TALER_TESTING_interpreter_fail (pds->is);
+ TALER_TESTING_unexpected_status (pds->is,
+ pdr->hr.http_status,
+ pds->expected_response_code);
return;
}
TALER_TESTING_interpreter_next (pds->is);
@@ -105,8 +98,15 @@ purse_delete_run (void *cls,
struct PurseDeleteState *pds = cls;
const struct TALER_PurseContractPrivateKeyP *purse_priv;
const struct TALER_TESTING_Command *ref;
+ const char *exchange_url;
(void) cmd;
+ exchange_url = TALER_TESTING_get_exchange_url (is);
+ if (NULL == exchange_url)
+ {
+ GNUNET_break (0);
+ return;
+ }
ref = TALER_TESTING_interpreter_lookup_command (is,
pds->purse_cmd);
if (NULL == ref)
@@ -125,7 +125,8 @@ purse_delete_run (void *cls,
}
pds->is = is;
pds->pdh = TALER_EXCHANGE_purse_delete (
- is->exchange,
+ TALER_TESTING_interpreter_get_context (is),
+ exchange_url,
purse_priv,
&purse_delete_cb,
pds);
@@ -153,10 +154,8 @@ purse_delete_cleanup (void *cls,
if (NULL != pds->pdh)
{
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "Command %u (%s) did not complete\n",
- pds->is->ip,
- cmd->label);
+ TALER_TESTING_command_incomplete (pds->is,
+ cmd->label);
TALER_EXCHANGE_purse_delete_cancel (pds->pdh);
pds->pdh = NULL;
}