gnunet-svn
[Top][All Lists]
Advanced

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

[taler-merchant] branch master updated: test order without claim token


From: gnunet
Subject: [taler-merchant] branch master updated: test order without claim token
Date: Fri, 31 Jul 2020 09:54:52 +0200

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

jonathan-buchanan pushed a commit to branch master
in repository merchant.

The following commit(s) were added to refs/heads/master by this push:
     new 9a13696  test order without claim token
9a13696 is described below

commit 9a1369603bd98944d8276989e36a78ec9a84b247
Author: Jonathan Buchanan <jonathan.russ.buchanan@gmail.com>
AuthorDate: Fri Jul 31 03:54:39 2020 -0400

    test order without claim token
---
 src/include/taler_merchant_testing_lib.h  |  2 ++
 src/testing/test_merchant_api.c           | 15 +++++++++++++++
 src/testing/testing_api_cmd_post_orders.c | 12 +++++++++---
 3 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/src/include/taler_merchant_testing_lib.h 
b/src/include/taler_merchant_testing_lib.h
index a22d361..edbb6ad 100644
--- a/src/include/taler_merchant_testing_lib.h
+++ b/src/include/taler_merchant_testing_lib.h
@@ -525,6 +525,7 @@ TALER_TESTING_cmd_merchant_post_orders_no_claim (const char 
*label,
  * @param order_id the name of the order to add.
  * @param refund_deadline the deadline for refunds on this order.
  * @param pay_deadline the deadline for payment on this order.
+ * @param claim_token whether to generate a claim token.
  * @param amount the amount this order is for.
  * @param payment_target payment target for the order.
  * @param products a string indicating the products this order will be
@@ -543,6 +544,7 @@ TALER_TESTING_cmd_merchant_post_orders2 (const char *label,
                                          refund_deadline,
                                          struct GNUNET_TIME_Absolute
                                          pay_deadline,
+                                         bool claim_token,
                                          const char *amount,
                                          const char *payment_target,
                                          const char *products,
diff --git a/src/testing/test_merchant_api.c b/src/testing/test_merchant_api.c
index 067616f..6ea9901 100644
--- a/src/testing/test_merchant_api.c
+++ b/src/testing/test_merchant_api.c
@@ -281,10 +281,21 @@ run (void *cls,
                                              "1",
                                              GNUNET_TIME_UNIT_ZERO_ABS,
                                              GNUNET_TIME_UNIT_FOREVER_ABS,
+                                             true,
                                              "EUR:5.0",
                                              "x-taler-bank",
                                              "",
                                              ""),
+    /*TALER_TESTING_cmd_merchant_post_orders2 ("create-proposal-1-idem",
+                                             merchant_url,
+                                             MHD_HTTP_OK,
+                                             "1",
+                                             GNUNET_TIME_UNIT_ZERO_ABS,
+                                             GNUNET_TIME_UNIT_FOREVER_ABS,
+                                             "EUR:5.0",
+                                             "x-taler-bank",
+                                             "",
+                                             ""),*/
     TALER_TESTING_cmd_merchant_claim_order ("reclaim-1",
                                             merchant_url,
                                             MHD_HTTP_OK,
@@ -498,6 +509,7 @@ run (void *cls,
                                              "order-p3",
                                              GNUNET_TIME_UNIT_ZERO_ABS,
                                              GNUNET_TIME_UNIT_FOREVER_ABS,
+                                             true,
                                              "EUR:5.0",
                                              "unsupported-wire-method",
                                              "product-3/2",
@@ -508,6 +520,7 @@ run (void *cls,
                                              "order-p3",
                                              GNUNET_TIME_UNIT_ZERO_ABS,
                                              GNUNET_TIME_UNIT_FOREVER_ABS,
+                                             true,
                                              "EUR:5.0",
                                              "x-taler-bank",
                                              "unknown-product/2",
@@ -519,6 +532,7 @@ run (void *cls,
       "order-p3",
       GNUNET_TIME_UNIT_ZERO_ABS,
       GNUNET_TIME_UNIT_FOREVER_ABS,
+      true,
       "EUR:5.0",
       "x-taler-bank",
       "product-3/24",
@@ -529,6 +543,7 @@ run (void *cls,
                                              "order-p3",
                                              GNUNET_TIME_UNIT_ZERO_ABS,
                                              GNUNET_TIME_UNIT_FOREVER_ABS,
+                                             false,
                                              "EUR:5.0",
                                              "x-taler-bank",
                                              "product-3/3",
diff --git a/src/testing/testing_api_cmd_post_orders.c 
b/src/testing/testing_api_cmd_post_orders.c
index a91bc21..f95d94a 100644
--- a/src/testing/testing_api_cmd_post_orders.c
+++ b/src/testing/testing_api_cmd_post_orders.c
@@ -77,6 +77,11 @@ struct OrdersState
    */
   struct GNUNET_CRYPTO_EddsaPublicKey nonce;
 
+  /**
+   * Whether to generate a claim token.
+   */
+  bool make_claim_token;
+
   /**
    * The claim token
    */
@@ -477,7 +482,7 @@ orders_run2 (void *cls,
                                         products,
                                         locks_length,
                                         locks,
-                                        true,
+                                        ps->make_claim_token,
                                         &order_cb,
                                         ps);
   json_decref (order);
@@ -714,6 +719,7 @@ TALER_TESTING_cmd_merchant_post_orders (const char *label,
  * @param order_id the name of the order to add.
  * @param refund_deadline the deadline for refunds on this order.
  * @param pay_deadline the deadline for payment on this order.
+ * @param claim_token whether to generate a claim token.
  * @param amount the amount this order is for.
  * @param payment_target payment target for the order.
  * @param products a string indicating the products this order will be
@@ -721,8 +727,6 @@ TALER_TESTING_cmd_merchant_post_orders (const char *label,
  *        "[product_id]/[quantity];...".
  * @param locks a string of references to lock product commands that should
  *        be formatted as "[lock_1];[lock_2];...".
- * @param ... a NULL-terminated list of paths that should be marked as
- *        forgettable in the contract terms.
  * @return the command
  */
 struct TALER_TESTING_Command
@@ -734,6 +738,7 @@ TALER_TESTING_cmd_merchant_post_orders2 (const char *label,
                                          refund_deadline,
                                          struct GNUNET_TIME_Absolute
                                          pay_deadline,
+                                         bool claim_token,
                                          const char *amount,
                                          const char *payment_target,
                                          const char *products,
@@ -754,6 +759,7 @@ TALER_TESTING_cmd_merchant_post_orders2 (const char *label,
   ps->products = products;
   ps->locks = locks;
   ps->with_claim = true;
+  ps->make_claim_token = claim_token;
   {
     struct TALER_TESTING_Command cmd = {
       .cls = ps,

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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