gnunet-svn
[Top][All Lists]
Advanced

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

[taler-merchant] 265/277: got tips test working again


From: gnunet
Subject: [taler-merchant] 265/277: got tips test working again
Date: Sun, 05 Jul 2020 20:52:58 +0200

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

grothoff pushed a commit to branch master
in repository merchant.

commit f641e252f0ae2e6ebc0cb5520363f69b65427c8b
Author: Jonathan Buchanan <jonathan.russ.buchanan@gmail.com>
AuthorDate: Mon Jun 29 15:51:40 2020 -0400

    got tips test working again
---
 src/backend/taler-merchant-httpd_reserves.c |  2 +-
 src/testing/test_merchant_api.c             | 11 ++++++++---
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_reserves.c 
b/src/backend/taler-merchant-httpd_reserves.c
index 8231e0d..172b6f9 100644
--- a/src/backend/taler-merchant-httpd_reserves.c
+++ b/src/backend/taler-merchant-httpd_reserves.c
@@ -179,7 +179,7 @@ reserve_cb (void *cls,
     try_later (r);
     return;
   }
-  if (0 !=
+  if (GNUNET_OK !=
       TALER_amount_cmp_currency (&r->expected_amount,
                                  balance))
   {
diff --git a/src/testing/test_merchant_api.c b/src/testing/test_merchant_api.c
index 501cc7e..adae22d 100644
--- a/src/testing/test_merchant_api.c
+++ b/src/testing/test_merchant_api.c
@@ -721,6 +721,10 @@ run (void *cls,
                                                    payer_payto,
                                                    "create-reserve-tip-1"),
     cmd_exec_wirewatch ("wirewatch-3"),
+    /* Sleep so the merchant discovers that the reserve exists at the exchange
+       before trying to authorize a tip. */
+    TALER_TESTING_cmd_sleep ("wait-reserve-1",
+                             1),
     TALER_TESTING_cmd_tip_authorize ("authorize-tip-1",
                                      merchant_url,
                                      EXCHANGE_URL,
@@ -748,6 +752,7 @@ run (void *cls,
     TALER_TESTING_cmd_merchant_get_reserves ("get-reserves-1",
                                              merchant_url,
                                              MHD_HTTP_OK,
+                                             "create-reserve-tip-1",
                                              NULL),
     TALER_TESTING_cmd_merchant_get_reserve ("get-reserve-1",
                                             merchant_url,
@@ -820,6 +825,8 @@ run (void *cls,
                                                    payer_payto,
                                                    "create-reserve-tip-2"),
     cmd_exec_wirewatch ("wirewatch-4"),
+    TALER_TESTING_cmd_sleep ("wait-reserve-2",
+                             1),
     TALER_TESTING_cmd_tip_authorize_from_reserve_with_ec (
       "authorize-tip-insufficient-funds",
       merchant_url,
@@ -1175,11 +1182,9 @@ run (void *cls,
 #endif
     TALER_TESTING_cmd_batch ("refund",
                              refund),
-#if 0
-// #endif
     TALER_TESTING_cmd_batch ("tip",
                              tip),
-// #if 0
+#if 0
     TALER_TESTING_cmd_batch ("pay-again",
                              pay_again),
     TALER_TESTING_cmd_batch ("pay-abort",

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