gnunet-svn
[Top][All Lists]
Advanced

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

[taler-merchant] 07/07: update pay order / using templates for test case


From: gnunet
Subject: [taler-merchant] 07/07: update pay order / using templates for test case totp
Date: Wed, 29 Mar 2023 16:39:54 +0200

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

priscilla-huang pushed a commit to branch master
in repository merchant.

commit 4e20744115a75d2fdb3cae2351cd873a9a8441ce
Author: priscilla <priscilla.huang@efrei.net>
AuthorDate: Wed Mar 29 10:39:34 2023 -0400

    update pay order / using templates for test case totp
---
 src/testing/test_merchant_api.c                    |  6 +++---
 src/testing/testing_api_cmd_post_templates.c       |  2 +-
 src/testing/testing_api_cmd_post_using_templates.c | 14 +++++++++++++-
 3 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/src/testing/test_merchant_api.c b/src/testing/test_merchant_api.c
index b7d8518e..6c8e5abd 100644
--- a/src/testing/test_merchant_api.c
+++ b/src/testing/test_merchant_api.c
@@ -1363,7 +1363,7 @@ run (void *cls,
       "template-2",
       "another template",
       NULL,
-      TALER_MCA_WITH_PRICE,
+      TALER_MCA_NONE,
       GNUNET_JSON_PACK (
         GNUNET_JSON_pack_uint64 ("minimum_age", 0),
         GNUNET_JSON_pack_time_rel ("pay_duration",
@@ -1397,7 +1397,7 @@ run (void *cls,
       "template-amount",
       "a different template with an amount",
       NULL,
-      TALER_MCA_WITHOUT_PRICE,
+      TALER_MCA_NONE,
       GNUNET_JSON_PACK (
         GNUNET_JSON_pack_uint64 ("minimum_age", 0),
         GNUNET_JSON_pack_time_rel ("pay_duration",
@@ -1445,7 +1445,7 @@ run (void *cls,
                                           MHD_HTTP_OK,
                                           "using-templates-t1",
                                           
"withdraw-coin-10a;withdraw-coin-10b",
-                                          "EUR:10",
+                                          "EUR:9.99",
                                           "EUR:9",
                                           NULL),
     TALER_TESTING_cmd_merchant_delete_template ("get-templates-empty",
diff --git a/src/testing/testing_api_cmd_post_templates.c 
b/src/testing/testing_api_cmd_post_templates.c
index 2def21ea..15a09125 100644
--- a/src/testing/testing_api_cmd_post_templates.c
+++ b/src/testing/testing_api_cmd_post_templates.c
@@ -269,7 +269,7 @@ TALER_TESTING_cmd_merchant_post_templates (const char 
*label,
     template_id,
     template_description,
     NULL,
-    TALER_MCA_WITHOUT_PRICE,
+    TALER_MCA_NONE,
     GNUNET_JSON_PACK (
       GNUNET_JSON_pack_uint64 ("minimum_age", 0),
       GNUNET_JSON_pack_time_rel ("pay_duration",
diff --git a/src/testing/testing_api_cmd_post_using_templates.c 
b/src/testing/testing_api_cmd_post_using_templates.c
index 62473b23..88fe9f9b 100644
--- a/src/testing/testing_api_cmd_post_using_templates.c
+++ b/src/testing/testing_api_cmd_post_using_templates.c
@@ -131,6 +131,11 @@ struct PostUsingTemplatesState
    */
   const char **template_pos_key;
 
+  /**
+   * Option that add amount of the order
+   */
+  const enum TALER_MerchantConfirmationAlgorithm *template_pos_alg;
+
   /**
    * Expected HTTP response code.
    */
@@ -349,10 +354,16 @@ post_using_templates_run (void *cls,
       TALER_TESTING_get_trait_template_id (ref,
                                            &template_id))
     TALER_TESTING_FAIL (is);
+
   if (GNUNET_OK !=
       TALER_TESTING_get_trait_template_pos_key (ref,
                                                 &tis->template_pos_key))
     TALER_TESTING_FAIL (is);
+
+  if (GNUNET_OK !=
+      TALER_TESTING_get_trait_template_pos_alg (ref,
+                                                &tis->template_pos_alg))
+    TALER_TESTING_FAIL (is);
   tis->iph = TALER_MERCHANT_using_templates_post (
     is->ctx,
     tis->merchant_url,
@@ -393,7 +404,8 @@ post_using_templates_traits (void *cls,
     TALER_TESTING_make_trait_merchant_pub (&pts->merchant_pub),
     TALER_TESTING_make_trait_claim_nonce (&pts->nonce),
     TALER_TESTING_make_trait_claim_token (&pts->claim_token),
-    TALER_TESTING_make_trait_template_pos_key (pts->template_pos_key), // 
extract from template creation CMD
+    TALER_TESTING_make_trait_template_pos_key (&pts->template_pos_key), // 
extract from template creation CMD
+    TALER_TESTING_make_trait_template_pos_alg (&pts->template_pos_alg),
     TALER_TESTING_trait_end (),
   };
 

-- 
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]