gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-merchant] branch master updated: starting with testi


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant] branch master updated: starting with testing tipping
Date: Wed, 01 Nov 2017 10:54:15 +0100

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

grothoff pushed a commit to branch master
in repository merchant.

The following commit(s) were added to refs/heads/master by this push:
     new 9e9dd55  starting with testing tipping
9e9dd55 is described below

commit 9e9dd55378307cc60af60a1bd4d7212ac2cdead6
Author: Christian Grothoff <address@hidden>
AuthorDate: Wed Nov 1 10:54:04 2017 +0100

    starting with testing tipping
---
 src/lib/test_merchant_api.c    | 34 ++++++++++++++++++++++++----------
 src/lib/test_merchant_api.conf | 10 +++++++++-
 2 files changed, 33 insertions(+), 11 deletions(-)

diff --git a/src/lib/test_merchant_api.c b/src/lib/test_merchant_api.c
index e1aa993..adbd52c 100644
--- a/src/lib/test_merchant_api.c
+++ b/src/lib/test_merchant_api.c
@@ -2338,7 +2338,7 @@ interpreter_run (void *cls)
       if (GNUNET_OK !=
           GNUNET_CONFIGURATION_get_value_string (cfg,
                                                  section,
-                                                 "tipping-reserve-priv",
+                                                 "TIP_RESERVE_PRIV",
                                                  &keys))
       {
         GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -2561,19 +2561,20 @@ interpreter_run (void *cls)
 
         /* Token syntax is "LABEL[/NUMBER]" */
         ctok = strchr (token, '/');
+       ci = 0;
         if (NULL != ctok)
         {
           *ctok = '\0';
           ctok++;
-        }
-        if (1 != sscanf (ctok,
-                         "%u",
-                         &ci))
-        {
-          GNUNET_break (0);
-          fail (is);
-          return;
-        }
+         if (1 != sscanf (ctok,
+                          "%u",
+                          &ci))
+         {
+           GNUNET_break (0);
+           fail (is);
+           return;
+         }
+       }
         GNUNET_assert (coin_ref = find_command (is,
                                                 token));
         switch (coin_ref->oc)
@@ -3096,6 +3097,19 @@ run (void *cls)
   struct InterpreterState *is;
   static struct Command commands[] =
   {
+    /* Test tipping */
+    { .oc = OC_ADMIN_ADD_INCOMING,
+      .label = "create-reserve-tip-1",
+      .expected_response_code = MHD_HTTP_OK,
+      .details.admin_add_incoming.instance = "tip",
+      .details.admin_add_incoming.sender_details
+      = "{ \"type\":\"test\", \"bank_uri\":\"" BANK_URI "\", \
+        \"account_number\":62, \"uuid\":100 }",
+      .details.admin_add_incoming.transfer_details
+        = "{ \"uuid\": 100}",
+      .details.admin_add_incoming.amount = "EUR:10.02" },
+    
+    
     /* Fill reserve with EUR:5.01, as withdraw fee is 1 ct per
        config */
     { .oc = OC_ADMIN_ADD_INCOMING,
diff --git a/src/lib/test_merchant_api.conf b/src/lib/test_merchant_api.conf
index be427ad..9767a37 100644
--- a/src/lib/test_merchant_api.conf
+++ b/src/lib/test_merchant_api.conf
@@ -33,7 +33,7 @@ WIREFORMAT = test
 # during the tests. 'default' instance should explicitly be given.
 # The instance "token" X must match the corresponding substring in
 # section like X-wireformat and merchant-instance-X
-INSTANCES = tor default
+INSTANCES = tor default tip
 
 # Default choice for maximum wire fee.
 DEFAULT_MAX_WIRE_FEE = EUR:0.10
@@ -82,9 +82,17 @@ TEST_RESPONSE_FILE = 
${TALER_CONFIG_HOME}/merchant/wire/test.json
 [merchant-instance-tor]
 KEYFILE = tor_merchant.priv
 
+[merchant-instance-tip]
+KEYFILE = reserve_tip.priv
+TIP_EXCHANGE = http://127.0.0.1:8081/
+TIP_RESERVE_PRIV = RKEJM3J3K8D02V6WFHWY14WM2RKFVBW35ZJ0FHWTEJDPN0T7CPYG
+
 [merchant-instance-wireformat-tor]
 TEST_RESPONSE_FILE = ${TALER_CONFIG_HOME}/merchant/wire/test.json
 
+[merchant-instance-wireformat-tip]
+TEST_RESPONSE_FILE = ${TALER_CONFIG_HOME}/merchant/wire/test.json
+
 # Auditors must be in sections "auditor-", the rest of the section
 # name could be anything.
 [merchant-auditor-ezb]

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



reply via email to

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