gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-merchant] branch master updated: Addressing #5383 le


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant] branch master updated: Addressing #5383 led to discover that..
Date: Thu, 26 Jul 2018 14:58:21 +0200

This is an automated email from the git hooks/post-receive script.

marcello pushed a commit to branch master
in repository merchant.

The following commit(s) were added to refs/heads/master by this push:
     new c993c0d  Addressing #5383 led to discover that..
c993c0d is described below

commit c993c0d650ae8fe603f38e6993f6f0966611f6dc
Author: Marcello Stanisci <address@hidden>
AuthorDate: Thu Jul 26 14:55:59 2018 +0200

    Addressing #5383 led to discover that..
    
    .. merchant-lib used to give a hard error
    for a 424 response on /track/transfer; fixed
    by just passing the control to the caller.
---
 src/lib/merchant_api_track_transfer.c |  3 ++
 src/lib/test_merchant_api_twisted.c   | 85 +++++++++++++++++++++++++++++++++++
 2 files changed, 88 insertions(+)

diff --git a/src/lib/merchant_api_track_transfer.c 
b/src/lib/merchant_api_track_transfer.c
index 7c78532..5766a57 100644
--- a/src/lib/merchant_api_track_transfer.c
+++ b/src/lib/merchant_api_track_transfer.c
@@ -179,6 +179,9 @@ handle_track_transfer_finished (void *cls,
     GNUNET_break_op (0);
     response_code = 0;
     break;
+  case MHD_HTTP_FAILED_DEPENDENCY:
+    /* Not a reason to break execution.  */ 
+    break;
   case MHD_HTTP_NOT_FOUND:
     /* Nothing really to verify, this should never
        happen, we should pass the JSON reply to the application */
diff --git a/src/lib/test_merchant_api_twisted.c 
b/src/lib/test_merchant_api_twisted.c
index 2193a46..b8ab4c1 100644
--- a/src/lib/test_merchant_api_twisted.c
+++ b/src/lib/test_merchant_api_twisted.c
@@ -551,6 +551,88 @@ run (void *cls,
     TALER_TESTING_cmd_end ()
   };
 
+  /***** Test #5383 *****/
+  struct TALER_TESTING_Command track_5383[] = {
+    CMD_TRANSFER_TO_EXCHANGE ("create-reserve-5383",
+                              "EUR:2.02"),
+    CMD_EXEC_WIREWATCH ("wirewatch-5383"),
+    TALER_TESTING_cmd_check_bank_transfer
+      ("check_bank_transfer-5383",
+       EXCHANGE_URL,
+       "EUR:2.02",
+       USER_ACCOUNT_NO,
+       EXCHANGE_ACCOUNT_NO),
+    TALER_TESTING_cmd_withdraw_amount
+      ("withdraw-coin-5383a",
+       is->exchange,
+       "create-reserve-5383",
+       "EUR:1",
+       MHD_HTTP_OK),
+    TALER_TESTING_cmd_withdraw_amount
+      ("withdraw-coin-5383b",
+       is->exchange,
+       "create-reserve-5383",
+       "EUR:1",
+       MHD_HTTP_OK),
+    TALER_TESTING_cmd_proposal
+      ("create-proposal-5383",
+       twister_merchant_url,
+       is->ctx,
+       MHD_HTTP_OK,
+       "{\"max_fee\":\
+          {\"currency\":\"EUR\",\
+           \"value\":0,\
+           \"fraction\":50000000},\
+        \"order_id\":\"5383\",\
+        \"refund_deadline\":\"\\/Date(0)\\/\",\
+        \"pay_deadline\":\"\\/Date(99999999999)\\/\",\
+        \"fulfillment_url\": \"https://example.com/\",\
+        \"amount\":\
+          {\"currency\":\"EUR\",\
+           \"value\":2,\
+           \"fraction\":0},\
+        \"summary\": \"merchant-lib testcase\",\
+        \"products\": [ {\"description\":\"ice cream\",\
+                         \"value\":\"{EUR:2}\"} ] }",
+        NULL),
+    TALER_TESTING_cmd_pay ("deposit-simple-5383",
+                           twister_merchant_url,
+                           is->ctx,
+                           MHD_HTTP_OK,
+                           "create-proposal-5383",
+                           "withdraw-coin-5383a;" \
+                           "withdraw-coin-5383b",
+                           "EUR:2",
+                           "EUR:1.99", // no sense now
+                           "EUR:0.01"), // no sense now
+    CMD_EXEC_AGGREGATOR ("run-aggregator-5383"),
+    TALER_TESTING_cmd_check_bank_transfer
+      ("check_aggregation_transfer-5383",
+       twister_exchange_url, /* has the 8888-port thing.  */
+       /* paid,         1.97 =
+          brutto        2.00 -
+          deposit fee   0.01 * 2 -
+          wire fee      0.01
+       */
+       "EUR:1.97",
+       EXCHANGE_ACCOUNT_NO,
+       MERCHANT_ACCOUNT_NO),
+    TALER_TESTING_cmd_modify_object_dl
+      ("hack-5383",
+       PROXY_EXCHANGE_CONFIG_FILE,
+       "total",
+       "EUR:0.98"),
+    TALER_TESTING_cmd_merchant_track_transfer
+      ("track-5383",
+       twister_merchant_url,
+       is->ctx,
+       MHD_HTTP_FAILED_DEPENDENCY,
+       "check_aggregation_transfer-5383"),
+
+    TALER_TESTING_cmd_end ()
+  };
+
+
   /***** Test transactions tracking *****/
   struct TALER_TESTING_Command track[] = {
 
@@ -900,6 +982,9 @@ run (void *cls,
     TALER_TESTING_cmd_batch ("track",
                              track),
 
+    TALER_TESTING_cmd_batch ("track-5383",
+                             track_5383),
+
     TALER_TESTING_cmd_batch ("pay",
                              pay),
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]