diff options
Diffstat (limited to 'src/testing/testing_api_cmd_delete_template.c')
-rw-r--r-- | src/testing/testing_api_cmd_delete_template.c | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/src/testing/testing_api_cmd_delete_template.c b/src/testing/testing_api_cmd_delete_template.c index dd2d38c8..6227c543 100644 --- a/src/testing/testing_api_cmd_delete_template.c +++ b/src/testing/testing_api_cmd_delete_template.c @@ -70,19 +70,17 @@ struct DeleteTemplateState */ static void delete_template_cb (void *cls, - const struct TALER_MERCHANT_HttpResponse *hr) + const struct TALER_MERCHANT_HttpResponse *hr) { struct DeleteTemplateState *dis = cls; dis->tdh = NULL; if (dis->http_status != hr->http_status) { - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Unexpected response code %u (%d) to command %s\n", - hr->http_status, - (int) hr->ec, - TALER_TESTING_interpreter_get_current_label (dis->is)); - TALER_TESTING_interpreter_fail (dis->is); + TALER_TESTING_unexpected_status_with_body (dis->is, + hr->http_status, + dis->http_status, + hr->reply); return; } switch (hr->http_status) @@ -114,17 +112,18 @@ delete_template_cb (void *cls, */ static void delete_template_run (void *cls, - const struct TALER_TESTING_Command *cmd, - struct TALER_TESTING_Interpreter *is) + const struct TALER_TESTING_Command *cmd, + struct TALER_TESTING_Interpreter *is) { struct DeleteTemplateState *dis = cls; dis->is = is; - dis->tdh = TALER_MERCHANT_template_delete (is->ctx, - dis->merchant_url, - dis->template_id, - &delete_template_cb, - dis); + dis->tdh = TALER_MERCHANT_template_delete ( + TALER_TESTING_interpreter_get_context (is), + dis->merchant_url, + dis->template_id, + &delete_template_cb, + dis); GNUNET_assert (NULL != dis->tdh); } @@ -138,7 +137,7 @@ delete_template_run (void *cls, */ static void delete_template_cleanup (void *cls, - const struct TALER_TESTING_Command *cmd) + const struct TALER_TESTING_Command *cmd) { struct DeleteTemplateState *dis = cls; @@ -154,9 +153,9 @@ delete_template_cleanup (void *cls, struct TALER_TESTING_Command TALER_TESTING_cmd_merchant_delete_template (const char *label, - const char *merchant_url, - const char *template_id, - unsigned int http_status) + const char *merchant_url, + const char *template_id, + unsigned int http_status) { struct DeleteTemplateState *dis; |