[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] branch master updated: testing webhooks
From: |
gnunet |
Subject: |
[taler-merchant] branch master updated: testing webhooks |
Date: |
Mon, 12 Dec 2022 14:38:26 +0100 |
This is an automated email from the git hooks/post-receive script.
priscilla-huang pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new 23e06d71 testing webhooks
23e06d71 is described below
commit 23e06d71884b593cc7e379cafece085be1680d53
Author: priscilla <priscilla.huang@efrei.net>
AuthorDate: Mon Dec 12 08:38:08 2022 -0500
testing webhooks
---
src/testing/test_kyc_api.c | 2 +-
src/testing/test_merchant_api.c | 76 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 77 insertions(+), 1 deletion(-)
diff --git a/src/testing/test_kyc_api.c b/src/testing/test_kyc_api.c
index 268b042c..5d47d9ba 100644
--- a/src/testing/test_kyc_api.c
+++ b/src/testing/test_kyc_api.c
@@ -6,7 +6,7 @@
it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 3, or
(at your option) any later version.
-
+
TALER is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
diff --git a/src/testing/test_merchant_api.c b/src/testing/test_merchant_api.c
index f99fb7b8..f6fb28a3 100644
--- a/src/testing/test_merchant_api.c
+++ b/src/testing/test_merchant_api.c
@@ -1367,6 +1367,80 @@ run (void *cls,
TALER_TESTING_cmd_end ()
};
+ struct TALER_TESTING_Command webhooks[] = {
+ TALER_TESTING_cmd_merchant_get_webhooks ("get-webhooks-empty",
+ merchant_url,
+ MHD_HTTP_OK,
+ NULL),
+ TALER_TESTING_cmd_merchant_post_webhooks ("post-webhooks-w1",
+ merchant_url,
+ "webhook-1",
+ "Paid",
+ MHD_HTTP_NO_CONTENT),
+ TALER_TESTING_cmd_merchant_post_webhooks ("post-webhooks-w1-idem",
+ merchant_url,
+ "webhook-1",
+ "Paid",
+ MHD_HTTP_NO_CONTENT),
+ TALER_TESTING_cmd_merchant_post_webhooks ("post-webhooks-w1-non-idem",
+ merchant_url,
+ "webhook-1",
+ "Refund",
+ MHD_HTTP_CONFLICT),
+ TALER_TESTING_cmd_merchant_get_webhooks ("get-webhooks-w1",
+ merchant_url,
+ MHD_HTTP_OK,
+ "post-webhooks-w1",
+ NULL),
+ TALER_TESTING_cmd_merchant_get_webhook ("get-webhook-w1",
+ merchant_url,
+ "webhook-1",
+ MHD_HTTP_OK,
+ "post-webhooks-w1"),
+ TALER_TESTING_cmd_merchant_post_webhooks ("post-webhooks-w2",
+ merchant_url,
+ "webhook-2",
+ "Paid",
+ MHD_HTTP_NO_CONTENT),
+ TALER_TESTING_cmd_merchant_patch_webhook ("patch-webhooks-w2",
+ merchant_url,
+ "webhook-2",
+ "Refund2",
+ "https://example.com",
+ "POST",
+ "Authorization:WHWOXZXPLL",
+ "Amount",
+ MHD_HTTP_NO_CONTENT),
+ TALER_TESTING_cmd_merchant_get_webhook ("get-webhook-w2",
+ merchant_url,
+ "webhook-2",
+ MHD_HTTP_OK,
+ "patch-webhooks-w2"),
+ TALER_TESTING_cmd_merchant_get_webhook ("get-webhook-nx",
+ merchant_url,
+ "webhook-nx",
+ MHD_HTTP_NOT_FOUND,
+ NULL),
+ TALER_TESTING_cmd_merchant_patch_webhook ("patch-webhooks-w3-nx",
+ merchant_url,
+ "webhook-3",
+ "Paid2",
+ "https://example.com",
+ "POST",
+ "Authorization:WHWOXZXPLL",
+ "Amount",
+ MHD_HTTP_NOT_FOUND),
+ TALER_TESTING_cmd_merchant_delete_webhook ("get-webhooks-empty",
+ merchant_url,
+ "w1",
+ MHD_HTTP_NOT_FOUND),
+ TALER_TESTING_cmd_merchant_delete_webhook ("get-webhooks-empty",
+ merchant_url,
+ "webhook-1",
+ MHD_HTTP_NO_CONTENT),
+ TALER_TESTING_cmd_end ()
+ };
+
struct TALER_TESTING_Command commands[] = {
/* general setup */
TALER_TESTING_cmd_auditor_add ("add-auditor-OK",
@@ -1719,6 +1793,8 @@ run (void *cls,
auth),
TALER_TESTING_cmd_batch ("templates",
templates),
+ TALER_TESTING_cmd_batch ("webhooks",
+ webhooks),
/**
* End the suite.
*/
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-merchant] branch master updated: testing webhooks,
gnunet <=