aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_purse_delete.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_purse_delete.c
parent015b08b0489d72f3fda587eec900bc4193a6a57e (diff)
downloadexchange-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_purse_delete.c')
-rw-r--r--src/testing/testing_api_cmd_purse_delete.c24
1 files changed, 9 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..758524ae2 100644
--- a/src/testing/testing_api_cmd_purse_delete.c
+++ b/src/testing/testing_api_cmd_purse_delete.c
@@ -74,16 +74,8 @@ 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);
return;
}
TALER_TESTING_interpreter_next (pds->is);
@@ -105,8 +97,12 @@ purse_delete_run (void *cls,
struct PurseDeleteState *pds = cls;
const struct TALER_PurseContractPrivateKeyP *purse_priv;
const struct TALER_TESTING_Command *ref;
+ struct TALER_EXCHANGE_Handle *exchange
+ = TALER_TESTING_get_exchange (is);
(void) cmd;
+ if (NULL == exchange)
+ return;
ref = TALER_TESTING_interpreter_lookup_command (is,
pds->purse_cmd);
if (NULL == ref)
@@ -125,7 +121,7 @@ purse_delete_run (void *cls,
}
pds->is = is;
pds->pdh = TALER_EXCHANGE_purse_delete (
- is->exchange,
+ exchange,
purse_priv,
&purse_delete_cb,
pds);
@@ -153,10 +149,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;
}