summaryrefslogtreecommitdiff
path: root/src/testing/test_merchant_api.c
diff options
context:
space:
mode:
authorJonathan Buchanan <jonathan.russ.buchanan@gmail.com>2020-07-14 03:05:12 -0400
committerJonathan Buchanan <jonathan.russ.buchanan@gmail.com>2020-07-14 03:05:12 -0400
commiteec18999238cf247043e9f9c093b5bcfa1eb87ea (patch)
treeef6ffb0818c72df4a82d16bc90e0f7c6e2b03e00 /src/testing/test_merchant_api.c
parente13b13b3041e905feb0e22a3488457c280dbeed2 (diff)
downloadmerchant-eec18999238cf247043e9f9c093b5bcfa1eb87ea.tar.gz
merchant-eec18999238cf247043e9f9c093b5bcfa1eb87ea.tar.bz2
merchant-eec18999238cf247043e9f9c093b5bcfa1eb87ea.zip
tests for idempotent/conflicting post requests
Diffstat (limited to 'src/testing/test_merchant_api.c')
-rw-r--r--src/testing/test_merchant_api.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/testing/test_merchant_api.c b/src/testing/test_merchant_api.c
index f01f93fb..90d88bf5 100644
--- a/src/testing/test_merchant_api.c
+++ b/src/testing/test_merchant_api.c
@@ -216,6 +216,13 @@ run (void *cls,
GNUNET_TIME_UNIT_ZERO_ABS,
GNUNET_TIME_UNIT_FOREVER_ABS,
"EUR:5.0"),
+ TALER_TESTING_cmd_merchant_post_orders ("create-proposal-1-pre-exists",
+ merchant_url,
+ MHD_HTTP_BAD_REQUEST,
+ "1",
+ GNUNET_TIME_UNIT_ZERO_ABS,
+ GNUNET_TIME_UNIT_FOREVER_ABS,
+ "EUR:5.0"),
TALER_TESTING_cmd_poll_orders_conclude ("poll-orders-1-conclude",
MHD_HTTP_OK,
"poll-orders-1-start"),
@@ -997,6 +1004,18 @@ run (void *cls,
PAYTO_I1,
"EUR",
MHD_HTTP_NO_CONTENT),
+ TALER_TESTING_cmd_merchant_post_instances ("instance-create-i2-idem",
+ merchant_url,
+ "i2",
+ PAYTO_I1,
+ "EUR",
+ MHD_HTTP_NO_CONTENT),
+ TALER_TESTING_cmd_merchant_post_instances ("instance-create-i2-non-idem",
+ merchant_url,
+ "i2",
+ "payto://other-method/",
+ "EUR",
+ MHD_HTTP_CONFLICT),
TALER_TESTING_cmd_merchant_delete_instance ("instance-delete-i2",
merchant_url,
"i2",
@@ -1026,6 +1045,18 @@ run (void *cls,
"a product",
"EUR:1",
MHD_HTTP_NO_CONTENT),
+ TALER_TESTING_cmd_merchant_post_products ("post-products-p1-idem",
+ merchant_url,
+ "product-1",
+ "a product",
+ "EUR:1",
+ MHD_HTTP_NO_CONTENT),
+ TALER_TESTING_cmd_merchant_post_products ("post-products-p1-non-idem",
+ merchant_url,
+ "product-1",
+ "a different product",
+ "EUR:1",
+ MHD_HTTP_CONFLICT),
TALER_TESTING_cmd_merchant_get_products ("get-products-p1",
merchant_url,
MHD_HTTP_OK,