diff options
Diffstat (limited to 'src/testing/test_merchant_api.c')
-rw-r--r-- | src/testing/test_merchant_api.c | 86 |
1 files changed, 20 insertions, 66 deletions
diff --git a/src/testing/test_merchant_api.c b/src/testing/test_merchant_api.c index 17984079..07e6b61b 100644 --- a/src/testing/test_merchant_api.c +++ b/src/testing/test_merchant_api.c @@ -607,25 +607,6 @@ run (void *cls, "EUR:5", "EUR:4.99", NULL), -#if 0 - TALER_TESTING_cmd_history ("history-0", - merchant_url, - MHD_HTTP_OK, - /** - * all records to be returned; setting date as 0 lets the - * interpreter set it as 'now' + one hour delta, just to - * make sure it surpasses the proposal's timestamp. - */// - GNUNET_TIME_UNIT_ZERO_ABS, - /** - * We only expect ONE result (create-proposal-1) to be - * included in /history response, because create-proposal-3 - * did NOT go through because of double spending. - */// - 1, // nresult - 10, // start - -10), // nrows -#endif TALER_TESTING_cmd_end () }; @@ -668,6 +649,17 @@ run (void *cls, GNUNET_TIME_UNIT_ZERO_ABS, GNUNET_TIME_UNIT_FOREVER_ABS, "EUR:5.0"), + TALER_TESTING_cmd_wallet_poll_order_start ("poll-order-wallet-refund-1-low", + merchant_url, + "create-proposal-1r", + GNUNET_TIME_UNIT_MINUTES, + "EUR:0.01"), + TALER_TESTING_cmd_wallet_poll_order_start ( + "poll-order-wallet-refund-1-high", + merchant_url, + "create-proposal-1r", + GNUNET_TIME_UNIT_MINUTES, + "EUR:0.2"), TALER_TESTING_cmd_merchant_pay_order ("pay-for-refund-1r", merchant_url, MHD_HTTP_OK, @@ -686,6 +678,10 @@ run (void *cls, "1r", /* order ID */ "EUR:0.1", MHD_HTTP_OK), + TALER_TESTING_cmd_wallet_poll_order_conclude ("poll-order-1-conclude-low", + MHD_HTTP_OK, + "EUR:0.1", + "poll-order-wallet-refund-1-low"), TALER_TESTING_cmd_wallet_get_order ("get-order-wallet-1r", merchant_url, "create-proposal-1r", @@ -699,6 +695,10 @@ run (void *cls, "1r", /* order ID */ "EUR:1.0", MHD_HTTP_OK), + TALER_TESTING_cmd_wallet_poll_order_conclude ("poll-order-1-conclude-high", + MHD_HTTP_OK, + "EUR:1.0", + "poll-order-wallet-refund-1-high"), TALER_TESTING_cmd_wallet_get_order ("get-order-wallet-1r-2", merchant_url, "create-proposal-1r", @@ -751,7 +751,7 @@ run (void *cls, GNUNET_TIME_UNIT_ZERO_ABS, GNUNET_TIME_UNIT_FOREVER_ABS, "EUR:5.0"), - /* Try to increase a non paid proposal. */ + /* Try to increase an unpaid proposal. */ TALER_TESTING_cmd_merchant_order_refund ("refund-increase-unpaid-proposal", merchant_url, "refund test", @@ -811,23 +811,6 @@ run (void *cls, 'refund-increase-1r' and 'refund-increase-1r-2' */ exchange_payto, merchant_payto), - /* Actually try to pick up the refund from the "unincreased proposal". */ -#if 0 - TALER_TESTING_cmd_refund_lookup_with_amount ("refund-lookup-unincreased", - merchant_url, - NULL, - "pay-unincreased-proposal", - "unincreased-proposal", - MHD_HTTP_NOT_FOUND, - /* If a lookup is attempted - * on an unincreased - * proposal, the backend will - * simply respond with a - * empty refunded coin "set", - * but the HTTP response code - * is 200 OK. */// - "EUR:0"), -#endif TALER_TESTING_cmd_end () }; @@ -1009,35 +992,6 @@ run (void *cls, merchant_url, "create-reserve-tip-1", MHD_HTTP_NOT_FOUND), -#if 0 - TALER_TESTING_cmd_merchant_post_orders ("create-proposal-tip-1", - merchant_url_internal ("tip"), - MHD_HTTP_OK, - "{\"max_fee\":\"EUR:0.5\",\ - \"order_id\":\"1-tip\", \ - \"refund_deadline\":{\"t_ms\":0},\ - \"pay_deadline\":{\"t_ms\":\"never\"},\ - \"amount\":\"EUR:5.0\",\ - \"summary\": \"useful product\",\ - \"fulfillment_url\": \"https://example.com/\",\ - \"products\": [ {\"description\":\"ice cream\",\ - \"value\":\"{EUR:5}\"} ] }"), - TALER_TESTING_cmd_merchant_pay_order ("deposit-tip-simple", - merchant_url_external ("tip"), - MHD_HTTP_OK, - "create-proposal-tip-1", - "pickup-tip-1", - "EUR:5", // amount + fee - "EUR:4.99", - NULL), // amount - fee - CMD_EXEC_AGGREGATOR ("aggregator-tip-1"), - TALER_TESTING_cmd_check_bank_transfer ("check_bank_transfer-tip-498c", - EXCHANGE_URL, - "EUR:4.98", - exchange_payto, - merchant_payto), - TALER_TESTING_cmd_check_bank_empty ("check_bank_empty-at-tips"), -#endif TALER_TESTING_cmd_end () }; |