summaryrefslogtreecommitdiff
path: root/src/merchant-tools
diff options
context:
space:
mode:
authorJonathan Buchanan <jonathan.russ.buchanan@gmail.com>2020-07-11 19:55:28 -0400
committerJonathan Buchanan <jonathan.russ.buchanan@gmail.com>2020-07-11 19:55:28 -0400
commitecb3a2afa27257816b34e4e959d98424ef123033 (patch)
tree7c75fe2d6e4a11357d26b24f0a3e70ba0ee4f0ce /src/merchant-tools
parentd299f7e7d288309dc696962edd9ce257d2c1a926 (diff)
downloadmerchant-ecb3a2afa27257816b34e4e959d98424ef123033.tar.gz
merchant-ecb3a2afa27257816b34e4e959d98424ef123033.tar.bz2
merchant-ecb3a2afa27257816b34e4e959d98424ef123033.zip
clean up testing post orders cmd
Diffstat (limited to 'src/merchant-tools')
-rw-r--r--src/merchant-tools/taler-merchant-benchmark.c75
1 files changed, 16 insertions, 59 deletions
diff --git a/src/merchant-tools/taler-merchant-benchmark.c b/src/merchant-tools/taler-merchant-benchmark.c
index e4109273..b86f78a2 100644
--- a/src/merchant-tools/taler-merchant-benchmark.c
+++ b/src/merchant-tools/taler-merchant-benchmark.c
@@ -141,10 +141,6 @@ run (void *cls,
char CURRENCY_4_99[MAX_AMOUNT_LEN];
char CURRENCY_0_02[MAX_AMOUNT_LEN];
char CURRENCY_0_01[MAX_AMOUNT_LEN];
- char order_worth_5[MAX_ORDER_LEN];
- char order_worth_5_track[MAX_ORDER_LEN];
- char order_worth_5_unaggregated[MAX_ORDER_LEN];
- char order_worth_10_2coins[MAX_ORDER_LEN];
GNUNET_snprintf (CURRENCY_10_02,
sizeof (CURRENCY_10_02),
@@ -178,57 +174,6 @@ run (void *cls,
sizeof (CURRENCY_0_01),
"%s:0.01",
currency);
- GNUNET_snprintf (order_worth_5,
- sizeof (order_worth_5),
- "{\"max_fee\": {\"currency\":\"%s\", \"value\":0, \"fraction\":50000000},"
- "\"refund_deadline\":\"\\/Date(0)\\/\","
- "\"pay_deadline\":\"\\/Date(99999999999)\\/\","
- "\"amount\": {\"currency\":\"%s\", \"value\":5, \"fraction\":0},"
- "\"summary\": \"merchant-lib testcase\","
- "\"fulfillment_url\": \"https://example.com/\","
- "\"products\": [ {\"description\":\"ice cream\", \"value\":\"{%s:5}\"} ] }",
- currency,
- currency,
- currency);
- GNUNET_snprintf (order_worth_5_track,
- sizeof (order_worth_5_track),
- "{\"max_fee\": {\"currency\":\"%s\", \"value\":0, \"fraction\":50000000},"
- "\"refund_deadline\":\"\\/Date(0)\\/\","
- "\"pay_deadline\":\"\\/Date(99999999999)\\/\","
- "\"amount\": {\"currency\":\"%s\", \"value\":5, \"fraction\":0},"
- "\"summary\": \"ice track cream!\","
- "\"fulfillment_url\": \"https://example.com/\","
- "\"products\": [ {\"description\":\"ice track cream\", \"value\":\"{%s:5}\"} ] }",
- currency,
- currency,
- currency);
- GNUNET_snprintf (order_worth_5_unaggregated,
- sizeof (order_worth_5_unaggregated),
- "{\"max_fee\": {\"currency\":\"%s\", \"value\":0, \"fraction\":50000000},"
- "\"wire_transfer_delay\":\"\\/Delay(30000)\\/\","
- "\"refund_deadline\":\"\\/Date(22)\\/\","
- "\"pay_deadline\":\"\\/Date(1)\\/\","
- "\"amount\": {\"currency\":\"%s\", \"value\":5, \"fraction\":0},"
- "\"summary\": \"unaggregated deposit!\","
- "\"fulfillment_url\": \"https://example.com/\","
- "\"products\": [ {\"description\":\"unaggregated cream\","
- "\"value\":\"{%s:5}\"} ] }",
- currency,
- currency,
- currency);
- GNUNET_snprintf (order_worth_10_2coins,
- sizeof (order_worth_10_2coins),
- "{\"max_fee\": {\"currency\":\"%s\", \"value\":0, \"fraction\":50000000},"
- "\"refund_deadline\":\"\\/Date(0)\\/\","
- "\"pay_deadline\":\"\\/Date(99999999999)\\/\","
- "\"amount\": {\"currency\":\"%s\",\"value\":10, \"fraction\":0},"
- "\"summary\": \"2-coins payment\","
- "\"fulfillment_url\": \"https://example.com/\","
- "\"products\": [ {\"description\":\"2-coins payment\","
- "\"value\":\"{%s:10}\"} ] }",
- currency,
- currency,
- currency);
if (NULL != apikey)
{
@@ -264,7 +209,10 @@ run (void *cls,
TALER_TESTING_cmd_merchant_post_orders ("create-proposal-1",
merchant_url,
MHD_HTTP_OK,
- order_worth_5),
+ "order-worth-5",
+ GNUNET_TIME_UNIT_ZERO_ABS,
+ GNUNET_TIME_UNIT_FOREVER_ABS,
+ "EUR:5.0"),
TALER_TESTING_cmd_merchant_pay_order ("deposit-simple",
merchant_url,
MHD_HTTP_OK,
@@ -281,7 +229,10 @@ run (void *cls,
TALER_TESTING_cmd_merchant_post_orders ("create-proposal-2",
merchant_url,
MHD_HTTP_OK,
- order_worth_5_track),
+ "order-worth-5-track",
+ GNUNET_TIME_UNIT_ZERO_ABS,
+ GNUNET_TIME_UNIT_FOREVER_ABS,
+ "EUR:5.0"),
TALER_TESTING_cmd_merchant_pay_order ("deposit-simple-2",
merchant_url,
MHD_HTTP_OK,
@@ -335,7 +286,10 @@ run (void *cls,
TALER_TESTING_cmd_merchant_post_orders ("create-unaggregated-proposal",
alt_instance_url,
MHD_HTTP_OK,
- order_worth_5_unaggregated),
+ "order-worth-5-unaggregated",
+ GNUNET_TIME_UNIT_ZERO_ABS,
+ GNUNET_TIME_UNIT_FOREVER_ABS,
+ "EUR:5.0"),
TALER_TESTING_cmd_merchant_pay_order ("deposit-unaggregated",
merchant_url,
MHD_HTTP_OK,
@@ -363,7 +317,10 @@ run (void *cls,
TALER_TESTING_cmd_merchant_post_orders ("create-twocoins-proposal",
merchant_url,
MHD_HTTP_OK,
- order_worth_10_2coins),
+ "order-worth-10-2coins",
+ GNUNET_TIME_UNIT_ZERO_ABS,
+ GNUNET_TIME_UNIT_FOREVER_ABS,
+ "EUR:10.0"),
TALER_TESTING_cmd_merchant_pay_order ("deposit-twocoins",
merchant_url,
MHD_HTTP_OK,