gnunet-svn
[Top][All Lists]
Advanced

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

[taler-merchant] 01/05: pull changes


From: gnunet
Subject: [taler-merchant] 01/05: pull changes
Date: Mon, 20 Feb 2023 18:19:45 +0100

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

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

commit 69341625aad4b0a1b3642103226f11c2ec4d943c
Author: priscilla <priscilla.huang@efrei.net>
AuthorDate: Mon Feb 20 04:39:40 2023 -0500

    pull changes
---
 src/testing/testing_api_cmd_get_template.c   | 24 ++++++++++++------------
 src/testing/testing_api_cmd_patch_template.c | 16 ++++++++--------
 src/testing/testing_api_cmd_post_templates.c | 20 ++++++++++++--------
 3 files changed, 32 insertions(+), 28 deletions(-)

diff --git a/src/testing/testing_api_cmd_get_template.c 
b/src/testing/testing_api_cmd_get_template.c
index bd9afff3..acd9a2e3 100644
--- a/src/testing/testing_api_cmd_get_template.c
+++ b/src/testing/testing_api_cmd_get_template.c
@@ -80,7 +80,7 @@ static void
 get_template_cb (void *cls,
                  const struct TALER_MERCHANT_HttpResponse *hr,
                  const char *template_description,
-                 const char *image,
+                 const char *pos_key,
                  const json_t *template_contract)
 {
   struct GetTemplateState *gis = cls;
@@ -120,22 +120,22 @@ get_template_cb (void *cls,
       }
     }
     {
-      const char **expected_image;
+      const char **expected_pos_key;
 
       if (GNUNET_OK !=
-          TALER_TESTING_get_trait_template_image (template_cmd,
-                                                  &expected_image))
+          TALER_TESTING_get_trait_template_pos_key (template_cmd,
+                                                    &expected_pos_key))
         TALER_TESTING_interpreter_fail (gis->is);
-      if ( ( (NULL == image) && (NULL != *expected_image)) ||
-           ( (NULL != image) && (NULL == *expected_image)) ||
-           ( (NULL != image) &&
-             (0 != strcmp (image,
-                           *expected_image)) ) )
+      if ( ( (NULL == pos_key) && (NULL != *expected_pos_key)) ||
+           ( (NULL != pos_key) && (NULL == *expected_pos_key)) ||
+           ( (NULL != pos_key) &&
+             (0 != strcmp (pos_key,
+                           *expected_pos_key)) ) )
       {
         GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                    "Template image `%s' does not match `%s'\n",
-                    image,
-                    *expected_image);
+                    "Template pos_key `%s' does not match `%s'\n",
+                    pos_key,
+                    *expected_pos_key);
         TALER_TESTING_interpreter_fail (gis->is);
         return;
       }
diff --git a/src/testing/testing_api_cmd_patch_template.c 
b/src/testing/testing_api_cmd_patch_template.c
index a2a75b89..f6f5771b 100644
--- a/src/testing/testing_api_cmd_patch_template.c
+++ b/src/testing/testing_api_cmd_patch_template.c
@@ -60,9 +60,9 @@ struct PatchTemplateState
   const char *template_description;
 
   /**
-   * base64-encoded template image
+   * base64-encoded key
    */
-  char *image;
+  char *pos_key;
 
   /**
    * Contract of the company
@@ -141,7 +141,7 @@ patch_template_run (void *cls,
                                            pis->merchant_url,
                                            pis->template_id,
                                            pis->template_description,
-                                           pis->image,
+                                           pis->pos_key,
                                            pis->template_contract,
                                            &patch_template_cb,
                                            pis);
@@ -168,8 +168,8 @@ patch_template_traits (void *cls,
   struct PatchTemplateState *pts = cls;
   struct TALER_TESTING_Trait traits[] = {
     TALER_TESTING_make_trait_template_description (&pts->template_description),
-    TALER_TESTING_make_trait_template_image (
-      (const char **) &pts->image),
+    TALER_TESTING_make_trait_template_pos_key (
+      (const char **) &pts->pos_key),
     TALER_TESTING_make_trait_template_contract (pts->template_contract),
     TALER_TESTING_make_trait_template_id (&pts->template_id),
     TALER_TESTING_trait_end (),
@@ -201,7 +201,7 @@ patch_template_cleanup (void *cls,
                 "PATCH /templates/$ID operation did not complete\n");
     TALER_MERCHANT_template_patch_cancel (pis->iph);
   }
-  GNUNET_free (pis->image);
+  GNUNET_free (pis->pos_key);
   json_decref (pis->template_contract);
   GNUNET_free (pis);
 }
@@ -213,7 +213,7 @@ TALER_TESTING_cmd_merchant_patch_template (
   const char *merchant_url,
   const char *template_id,
   const char *template_description,
-  const char *image,
+  const char *pos_key,
   json_t *template_contract,
   unsigned int http_status)
 {
@@ -224,7 +224,7 @@ TALER_TESTING_cmd_merchant_patch_template (
   pis->template_id = template_id;
   pis->http_status = http_status;
   pis->template_description = template_description;
-  pis->image = (NULL == image) ? NULL : GNUNET_strdup (image);
+  pis->pos_key = (NULL == pos_key) ? NULL : GNUNET_strdup (pos_key);
   pis->template_contract = template_contract; /* ownership taken */
   {
     struct TALER_TESTING_Command cmd = {
diff --git a/src/testing/testing_api_cmd_post_templates.c 
b/src/testing/testing_api_cmd_post_templates.c
index 32b8d627..85dea3a4 100644
--- a/src/testing/testing_api_cmd_post_templates.c
+++ b/src/testing/testing_api_cmd_post_templates.c
@@ -60,9 +60,9 @@ struct PostTemplatesState
   const char *template_description;
 
   /**
-   * base64-encoded product image
+   * base64-encoded key
    */
-  char *image;
+  char *pos_key;
 
   /**
    * Contract of the company
@@ -97,6 +97,10 @@ post_templates_cb (void *cls,
                 hr->http_status,
                 (int) hr->ec,
                 TALER_TESTING_interpreter_get_current_label (tis->is));
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "tis %u vs hr %u",
+                tis->http_status,
+                hr->http_status);
     TALER_TESTING_interpreter_fail (tis->is);
     return;
   }
@@ -140,7 +144,7 @@ post_templates_run (void *cls,
                                             tis->merchant_url,
                                             tis->template_id,
                                             tis->template_description,
-                                            tis->image,
+                                            tis->pos_key,
                                             tis->template_contract,
                                             &post_templates_cb,
                                             tis);
@@ -172,8 +176,8 @@ post_templates_traits (void *cls,
   struct PostTemplatesState *pts = cls;
   struct TALER_TESTING_Trait traits[] = {
     TALER_TESTING_make_trait_template_description (&pts->template_description),
-    TALER_TESTING_make_trait_template_image (
-      (const char **) &pts->image),
+    TALER_TESTING_make_trait_template_pos_key (
+      (const char **) &pts->pos_key),
     TALER_TESTING_make_trait_template_contract (pts->template_contract),
     TALER_TESTING_make_trait_template_id (&pts->template_id),
     TALER_TESTING_trait_end (),
@@ -205,7 +209,7 @@ post_templates_cleanup (void *cls,
                 "POST /templates operation did not complete\n");
     TALER_MERCHANT_templates_post_cancel (tis->iph);
   }
-  GNUNET_free (tis->image);
+  GNUNET_free (tis->pos_key);
   json_decref (tis->template_contract);
   GNUNET_free (tis);
 }
@@ -217,7 +221,7 @@ TALER_TESTING_cmd_merchant_post_templates2 (
   const char *merchant_url,
   const char *template_id,
   const char *template_description,
-  const char *image,
+  const char *pos_key,
   json_t *template_contract,
   unsigned int http_status)
 {
@@ -231,7 +235,7 @@ TALER_TESTING_cmd_merchant_post_templates2 (
   tis->template_id = template_id;
   tis->http_status = http_status;
   tis->template_description = template_description;
-  tis->image = (NULL == image) ? NULL : GNUNET_strdup (image);
+  tis->pos_key = (NULL == pos_key) ? NULL : GNUNET_strdup (pos_key);
   tis->template_contract = template_contract;
   {
     struct TALER_TESTING_Command cmd = {

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