diff options
author | priscilla <priscilla.huang@efrei.net> | 2022-12-05 07:58:38 -0500 |
---|---|---|
committer | priscilla <priscilla.huang@efrei.net> | 2022-12-05 07:58:38 -0500 |
commit | 3569c4e5f1074c686a20abd1b2aadd7ef9b7c7d5 (patch) | |
tree | a9c7f5f0af567253bd3be18d6daa1e84ab723e7a /src | |
parent | 7d9284f5f848b343fd555fc4ef4031966b46e5f6 (diff) |
update
Diffstat (limited to 'src')
-rw-r--r-- | src/include/taler_merchant_testing_lib.h | 8 | ||||
-rw-r--r-- | src/testing/Makefile.am | 5 | ||||
-rw-r--r-- | src/testing/testing_api_cmd_delete_webhook.c | 2 | ||||
-rw-r--r-- | src/testing/testing_api_cmd_get_webhook.c | 6 |
4 files changed, 16 insertions, 5 deletions
diff --git a/src/include/taler_merchant_testing_lib.h b/src/include/taler_merchant_testing_lib.h index 2d9cb0d5..8baad7a2 100644 --- a/src/include/taler_merchant_testing_lib.h +++ b/src/include/taler_merchant_testing_lib.h @@ -1794,7 +1794,13 @@ TALER_TESTING_cmd_merchant_delete_webhook (const char *label, op (template_description, const char *) \ op (template_image, const char *) \ op (template_id, const char *) \ - op (template_contract, const json_t) + op (template_contract, const json_t)\ + op (event_type, const char *) \ + op (url, const char *) \ + op (webhook_id, const char *) \ + op (http_method, const char *) \ + op (header_template, const char *) \ + op (body_template, const char *) /** diff --git a/src/testing/Makefile.am b/src/testing/Makefile.am index a9561cae..af98f4e1 100644 --- a/src/testing/Makefile.am +++ b/src/testing/Makefile.am @@ -40,10 +40,13 @@ libtalermerchanttesting_la_SOURCES = \ testing_api_cmd_get_transfers.c \ testing_api_cmd_get_templates.c \ testing_api_cmd_get_template.c \ + testing_api_cmd_get_webhooks.c \ + testing_api_cmd_get_webhook.c \ testing_api_cmd_delete_instance.c \ testing_api_cmd_delete_order.c \ testing_api_cmd_delete_product.c \ testing_api_cmd_delete_template.c \ + testing_api_cmd_delete_webhook.c \ testing_api_cmd_delete_reserve.c \ testing_api_cmd_delete_transfer.c \ testing_api_cmd_forget_order.c \ @@ -60,9 +63,11 @@ libtalermerchanttesting_la_SOURCES = \ testing_api_cmd_post_reserves.c \ testing_api_cmd_post_transfers.c \ testing_api_cmd_post_templates.c \ + testing_api_cmd_post_webhooks.c \ testing_api_cmd_patch_instance.c \ testing_api_cmd_patch_product.c \ testing_api_cmd_patch_template.c \ + testing_api_cmd_patch_webhook.c \ testing_api_cmd_refund_order.c \ \ testing_api_cmd_tip_authorize.c \ diff --git a/src/testing/testing_api_cmd_delete_webhook.c b/src/testing/testing_api_cmd_delete_webhook.c index 3648ca1f..d8711598 100644 --- a/src/testing/testing_api_cmd_delete_webhook.c +++ b/src/testing/testing_api_cmd_delete_webhook.c @@ -162,7 +162,7 @@ TALER_TESTING_cmd_merchant_delete_webhook (const char *label, dis = GNUNET_new (struct DeleteWebhookState); dis->merchant_url = merchant_url; - dis->template_id = webhook_id; + dis->webhook_id = webhook_id; dis->http_status = http_status; { struct TALER_TESTING_Command cmd = { diff --git a/src/testing/testing_api_cmd_get_webhook.c b/src/testing/testing_api_cmd_get_webhook.c index 44553caa..9a5648db 100644 --- a/src/testing/testing_api_cmd_get_webhook.c +++ b/src/testing/testing_api_cmd_get_webhook.c @@ -79,7 +79,7 @@ struct GetWebhookState * @param body_template of the webhook */ static void -get_template_cb (void *cls, +get_webhook_cb (void *cls, const struct TALER_MERCHANT_HttpResponse *hr, const char *event_type, const char *url, @@ -107,14 +107,14 @@ get_template_cb (void *cls, { const char **expected_event_type; - template_cmd = TALER_TESTING_interpreter_lookup_command ( + webhook_cmd = TALER_TESTING_interpreter_lookup_command ( gis->is, gis->webhook_reference); if (GNUNET_OK != TALER_TESTING_get_trait_event_type (webhook_cmd, &expected_event_type)) TALER_TESTING_interpreter_fail (gis->is); - if (0 != strcmp (event_type, , + if (0 != strcmp (event_type, *expected_event_type)) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |