gnunet-svn
[Top][All Lists]
Advanced

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

[taler-merchant] branch master updated: make test_merchant_api succeed a


From: gnunet
Subject: [taler-merchant] branch master updated: make test_merchant_api succeed again
Date: Sun, 19 Jan 2020 01:14:19 +0100

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

dold pushed a commit to branch master
in repository merchant.

The following commit(s) were added to refs/heads/master by this push:
     new f851409  make test_merchant_api succeed again
f851409 is described below

commit f85140982396eda32dde9e0c67203f5474d431fa
Author: Florian Dold <address@hidden>
AuthorDate: Sun Jan 19 01:14:14 2020 +0100

    make test_merchant_api succeed again
---
 src/lib/test_merchant_api.c              | 58 ++++++++++++++++----------------
 src/lib/testing_api_cmd_pay.c            |  2 +-
 src/lib/testing_api_cmd_tip_pickup.c     |  3 +-
 src/lib/testing_api_cmd_track_transfer.c |  2 +-
 4 files changed, 33 insertions(+), 32 deletions(-)

diff --git a/src/lib/test_merchant_api.c b/src/lib/test_merchant_api.c
index 3b8ac07..eb630a3 100644
--- a/src/lib/test_merchant_api.c
+++ b/src/lib/test_merchant_api.c
@@ -229,9 +229,9 @@ run (void *cls,
     TALER_TESTING_cmd_check_bank_admin_transfer
       ("check_bank_transfer-2",
       "EUR:10.02",
-      payer_payto, // payer payto
+      payer_payto,
       exchange_payto,
-      "create-reserve-1"), // payee exchange payto
+      "create-reserve-1"),
 
     TALER_TESTING_cmd_withdraw_amount
       ("withdraw-coin-1",
@@ -399,21 +399,22 @@ run (void *cls,
       ("create-reserve-2b",
       "EUR:4.01",
       &bc.exchange_auth,
-      exchange_payto,
+      payer_payto,
       "create-reserve-2"),
     CMD_EXEC_WIREWATCH ("wirewatch-2"),
-    TALER_TESTING_cmd_check_bank_transfer
+
+    TALER_TESTING_cmd_check_bank_admin_transfer
       ("check_bank_transfer-2a",
-      EXCHANGE_URL,
       "EUR:1",
       payer_payto,
-      exchange_payto),
-    TALER_TESTING_cmd_check_bank_transfer
+      exchange_payto,
+      "create-reserve-2"),
+    TALER_TESTING_cmd_check_bank_admin_transfer
       ("check_bank_transfer-2b",
-      EXCHANGE_URL,
       "EUR:4.01",
       payer_payto,
-      exchange_payto),
+      exchange_payto,
+      "create-reserve-2"),
     TALER_TESTING_cmd_withdraw_amount ("withdraw-coin-2",
                                        "create-reserve-2",
                                        "EUR:5",
@@ -498,7 +499,7 @@ run (void *cls,
         \"order_id\":\"1-unpaid\",\
         \"refund_deadline\":{\"t_ms\":0},\
         \"pay_deadline\":{\"t_ms\":99999999999},\
-        \"amount\":\"EUR:5.0\"\
+        \"amount\":\"EUR:5.0\",\
         \"summary\": \"useful product\",\
         \"fulfillment_url\": \"https://example.com/\",\
         \"products\": [ {\"description\":\"ice cream\",\
@@ -536,12 +537,12 @@ run (void *cls,
 
     CMD_EXEC_WIREWATCH ("wirewatch-unincreased-refund"),
 
-    TALER_TESTING_cmd_check_bank_transfer
+    TALER_TESTING_cmd_check_bank_admin_transfer
       ("check_bank_transfer-unincreased-refund",
-      EXCHANGE_URL,
       "EUR:5.01",
       payer_payto,
-      exchange_payto),
+      exchange_payto,
+      "create-reserve-unincreased-refund"),
 
     TALER_TESTING_cmd_withdraw_amount
       ("withdraw-coin-unincreased-refund",
@@ -557,7 +558,7 @@ run (void *cls,
         \"order_id\":\"unincreased-proposal\",\
         \"refund_deadline\":{\"t_ms\":0},\
         \"pay_deadline\":{\"t_ms\":99999999999},\
-        \"amount\":\"EUR:5.0\"\
+        \"amount\":\"EUR:5.0\",\
         \"summary\": \"merchant-lib testcase\",\
         \"fulfillment_url\": \"https://example.com/\",\
         \"products\": [ {\"description\":\"ice cream\",\
@@ -612,12 +613,12 @@ run (void *cls,
 
     CMD_EXEC_WIREWATCH ("wirewatch-3"),
 
-    TALER_TESTING_cmd_check_bank_transfer
+    TALER_TESTING_cmd_check_bank_admin_transfer
       ("check_bank_transfer-tip-1",
-      EXCHANGE_URL,
       "EUR:20.04",
       payer_payto,
-      exchange_payto),
+      exchange_payto,
+      "create-reserve-tip-1"),
 
     TALER_TESTING_cmd_tip_authorize ("authorize-tip-1",
                                      merchant_url_internal ("tip"),
@@ -691,12 +692,12 @@ run (void *cls,
       "dtip",
       CONFIG_FILE),
 
-    TALER_TESTING_cmd_check_bank_transfer
+    TALER_TESTING_cmd_check_bank_admin_transfer
       ("check_bank_transfer-insufficient-tip-funds",
-      EXCHANGE_URL,
       "EUR:1.01",
       payer_payto,
-      exchange_payto),
+      exchange_payto,
+      "create-reserve-insufficient-funds"),
 
     CMD_EXEC_WIREWATCH
       ("wirewatch-insufficient-tip-funds"),
@@ -784,17 +785,16 @@ run (void *cls,
   };
 
   struct TALER_TESTING_Command pay_again[] = {
-    CMD_TRANSFER_TO_EXCHANGE ("create-reserve-1",
+    CMD_TRANSFER_TO_EXCHANGE ("create-reserve-10",
                               "EUR:10.02"),
 
     CMD_EXEC_WIREWATCH ("wirewatch-10"),
-
-    TALER_TESTING_cmd_check_bank_transfer
+    TALER_TESTING_cmd_check_bank_admin_transfer
       ("check_bank_transfer-10",
-      EXCHANGE_URL,
       "EUR:10.02",
       payer_payto,
-      exchange_payto),
+      exchange_payto,
+      "create-reserve-10"),
 
     TALER_TESTING_cmd_withdraw_amount ("withdraw-coin-10a",
                                        "create-reserve-10",
@@ -861,12 +861,12 @@ run (void *cls,
 
     CMD_EXEC_WIREWATCH ("wirewatch-11"),
 
-    TALER_TESTING_cmd_check_bank_transfer
+    TALER_TESTING_cmd_check_bank_admin_transfer
       ("check_bank_transfer-11",
-      EXCHANGE_URL,
       "EUR:10.02",
       payer_payto,
-      exchange_payto),
+      exchange_payto,
+      "create-reserve-11"),
 
     TALER_TESTING_cmd_withdraw_amount ("withdraw-coin-11a",
                                        "create-reserve-11",
@@ -891,7 +891,7 @@ run (void *cls,
         \"order_id\":\"11\",\
         \"refund_deadline\":{\"t_ms\":0},\
         \"pay_deadline\":{\"t_ms\":99999999999},\
-        \"amount\":\"EUR:10.0\"\
+        \"amount\":\"EUR:10.0\",\
         \"summary\": \"merchant-lib testcase\",\
         \"fulfillment_url\": \"https://example.com/\",\
         \"products\": [ {\"description\":\"ice cream\",\
diff --git a/src/lib/testing_api_cmd_pay.c b/src/lib/testing_api_cmd_pay.c
index 4714364..ff15bd3 100644
--- a/src/lib/testing_api_cmd_pay.c
+++ b/src/lib/testing_api_cmd_pay.c
@@ -297,7 +297,7 @@ build_coins (struct TALER_MERCHANT_PayCoin **pc,
                                           &dpk->fee_deposit));
     GNUNET_assert (GNUNET_OK ==
                    TALER_TESTING_get_trait_url (coin_cmd,
-                                                0,
+                                                
TALER_TESTING_UT_EXCHANGE_BASE_URL,
                                                 &icoin->exchange_url));
     GNUNET_assert (GNUNET_OK ==
                    TALER_string_to_amount (refund_fee,
diff --git a/src/lib/testing_api_cmd_tip_pickup.c 
b/src/lib/testing_api_cmd_tip_pickup.c
index 4a537f9..6d40547 100644
--- a/src/lib/testing_api_cmd_tip_pickup.c
+++ b/src/lib/testing_api_cmd_tip_pickup.c
@@ -499,7 +499,8 @@ tip_pickup_traits (void *cls,
 
   }
   traits[NUM_TRAITS - 2] = TALER_TESTING_make_trait_url
-                             (0, tps->exchange_url);
+                             (TALER_TESTING_UT_EXCHANGE_BASE_URL,
+                             tps->exchange_url);
   traits[NUM_TRAITS - 1] = TALER_TESTING_trait_end ();
 
   return TALER_TESTING_get_trait (traits,
diff --git a/src/lib/testing_api_cmd_track_transfer.c 
b/src/lib/testing_api_cmd_track_transfer.c
index 3d1d76b..a579621 100644
--- a/src/lib/testing_api_cmd_track_transfer.c
+++ b/src/lib/testing_api_cmd_track_transfer.c
@@ -249,7 +249,7 @@ track_transfer_run (void *cls,
         (check_bank_cmd, 0, &wtid))
     TALER_TESTING_FAIL (is);
   if (GNUNET_OK != TALER_TESTING_get_trait_url
-        (check_bank_cmd, 0, &exchange_url))
+        (check_bank_cmd, TALER_TESTING_UT_EXCHANGE_BASE_URL, &exchange_url))
     TALER_TESTING_FAIL (is);
   tts->tth = TALER_MERCHANT_track_transfer (is->ctx,
                                             tts->merchant_url,

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

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