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 (288034d -> a93cd54)


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant] branch master updated (288034d -> a93cd54)
Date: Thu, 22 Mar 2018 19:45:51 +0100

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

marcello pushed a change to branch master
in repository merchant.

    from 288034d  cover pay abortion.
     new ecf859b  to the point where a double-spend is triggered.
     new a93cd54  coin signature fails when processing coin history.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/lib/test_merchant_api_twisted.c | 83 +++++++++++++++++++++++++++++++++++++
 1 file changed, 83 insertions(+)

diff --git a/src/lib/test_merchant_api_twisted.c 
b/src/lib/test_merchant_api_twisted.c
index fe5c737..1341501 100644
--- a/src/lib/test_merchant_api_twisted.c
+++ b/src/lib/test_merchant_api_twisted.c
@@ -562,6 +562,8 @@ run (void *cls,
                          \"value\":\"{EUR:3}\"} ] }",
         NULL),
 
+    /* Will only pay _half_ the supposed price,
+     * so we'll then have the right to abort.  */
     TALER_TESTING_cmd_pay ("deposit-simple-for-abort",
                            twister_merchant_url,
                            is->ctx,
@@ -615,6 +617,87 @@ run (void *cls,
                                  "deposit-simple-for-abort",
                                  is->ctx,
                                  0),
+
+    CMD_TRANSFER_TO_EXCHANGE ("create-reserve-double-spend",
+                              "EUR:1.01"),
+
+    CMD_EXEC_WIREWATCH ("wirewatch-double-spend"),
+
+    TALER_TESTING_cmd_proposal
+      ("create-proposal-double-spend",
+       twister_merchant_url,
+       is->ctx,
+       MHD_HTTP_OK,
+       "{\"max_fee\":\
+          {\"currency\":\"EUR\",\
+           \"value\":0,\
+           \"fraction\":50000000},\
+        \"order_id\":\"DS-1\",\
+        \"refund_deadline\":\"\\/Date(0)\\/\",\
+        \"pay_deadline\":\"\\/Date(99999999999)\\/\",\
+        \"fulfillment_url\": \"https://example.com/\",\
+        \"amount\":\
+          {\"currency\":\"EUR\",\
+           \"value\":1,\
+           \"fraction\":0},\
+        \"summary\": \"merchant-lib testcase\",\
+        \"products\": [ {\"description\": \"will succeed\"}] }",
+        NULL),
+
+    TALER_TESTING_cmd_proposal
+      ("create-proposal-double-spend-1",
+       twister_merchant_url,
+       is->ctx,
+       MHD_HTTP_OK,
+       "{\"max_fee\":\
+          {\"currency\":\"EUR\",\
+           \"value\":0,\
+           \"fraction\":50000000},\
+        \"order_id\":\"DS-2\",\
+        \"refund_deadline\":\"\\/Date(0)\\/\",\
+        \"pay_deadline\":\"\\/Date(99999999999)\\/\",\
+        \"fulfillment_url\": \"https://example.com/\",\
+        \"amount\":\
+          {\"currency\":\"EUR\",\
+           \"value\":1,\
+           \"fraction\":0},\
+        \"summary\": \"merchant-lib testcase\",\
+        \"products\": [ {\"description\": \"will fail\"}] }",
+        NULL),
+
+    TALER_TESTING_cmd_withdraw_amount
+      ("withdraw-coin-double-spend",
+       is->exchange,
+       "create-reserve-double-spend",
+       "EUR:1",
+       MHD_HTTP_OK),
+
+    TALER_TESTING_cmd_pay ("deposit-simple-ok",
+                           twister_merchant_url,
+                           is->ctx,
+                           MHD_HTTP_OK,
+                           "create-proposal-double-spend",
+                           "withdraw-coin-double-spend",
+                           "EUR:1",
+                           "EUR:1.99", // no sense now
+                           "EUR:0.01"), // no sense now
+
+    TALER_TESTING_cmd_flip_object
+      ("hack-coin-history",
+       PROXY_MERCHANT_CONFIG_FILE,
+       "history.0.coin_sig"),
+
+    /* Coin history will fail, due to coin's bad signature.  */
+    TALER_TESTING_cmd_pay ("deposit-simple-fail",
+                           twister_merchant_url,
+                           is->ctx,
+                           0,
+                           "create-proposal-double-spend-1",
+                           "withdraw-coin-double-spend",
+                           "EUR:1",
+                           "EUR:1.99", // no sense now
+                           "EUR:0.01"), // no sense now
+
     /**
      * End the suite.  Fixme: better to have a label for this
      * too, as it shows a "(null)" token on logs.

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



reply via email to

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