gnunet-svn
[Top][All Lists]
Advanced

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

[taler-merchant] 116/277: fix test


From: gnunet
Subject: [taler-merchant] 116/277: fix test
Date: Sun, 05 Jul 2020 20:50:29 +0200

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

grothoff pushed a commit to branch master
in repository merchant.

commit 8e7843ad5110109a5362864d3271a17a6c7f8fba
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Mon May 18 12:36:04 2020 +0200

    fix test
---
 src/testing/testing_api_cmd_pay_order.c | 26 +++++++++++++++++++-------
 1 file changed, 19 insertions(+), 7 deletions(-)

diff --git a/src/testing/testing_api_cmd_pay_order.c 
b/src/testing/testing_api_cmd_pay_order.c
index dbffe4f..ee47ae5 100644
--- a/src/testing/testing_api_cmd_pay_order.c
+++ b/src/testing/testing_api_cmd_pay_order.c
@@ -231,17 +231,28 @@ pay_cb (void *cls,
     struct GNUNET_JSON_Specification spec[] = {
       GNUNET_JSON_spec_fixed_auto ("sig",
                                    &sig),
-      GNUNET_JSON_spec_fixed_auto ("h_contract_terms",
-                                   &ps->h_contract_terms),
       GNUNET_JSON_spec_end ()
     };
     const struct TALER_TESTING_Command *proposal_cmd;
 
-    GNUNET_assert (GNUNET_OK ==
-                   GNUNET_JSON_parse (hr->reply,
-                                      spec,
-                                      &error_name,
-                                      &error_line));
+    if (GNUNET_OK !=
+        GNUNET_JSON_parse (hr->reply,
+                           spec,
+                           &error_name,
+                           &error_line))
+    {
+      char *js;
+
+      js = json_dumps (hr->reply,
+                       JSON_INDENT (1));
+      GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                  "Parser failed on %s:%u for input `%s'\n",
+                  error_name,
+                  error_line,
+                  js);
+      free (js);
+      TALER_TESTING_FAIL (ps->is);
+    }
     mr.purpose.purpose = htonl (TALER_SIGNATURE_MERCHANT_PAYMENT_OK);
     mr.purpose.size = htonl (sizeof (mr));
     mr.h_contract_terms = ps->h_contract_terms;
@@ -392,6 +403,7 @@ pay_run (void *cls,
                                                 0,
                                                 &h_proposal))
     TALER_TESTING_FAIL (is);
+  ps->h_contract_terms = *h_proposal;
   ps->oph = TALER_MERCHANT_order_pay (is->ctx,
                                       ps->merchant_url,
                                       "", /* session ID */

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