gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis] branch master updated: fix misc minor issues


From: gnunet
Subject: [taler-anastasis] branch master updated: fix misc minor issues
Date: Sun, 21 Feb 2021 19:40:38 +0100

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

grothoff pushed a commit to branch master
in repository anastasis.

The following commit(s) were added to refs/heads/master by this push:
     new 3a9c8e0  fix misc minor issues
3a9c8e0 is described below

commit 3a9c8e0b0168e63c5b4c3d3e10e5c744b0f39423
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sun Feb 21 19:40:36 2021 +0100

    fix misc minor issues
---
 src/restclient/anastasis_api_config.c | 26 ++++++++++++++++++++------
 src/testing/test_anastasis.c          |  6 +++---
 src/testing/test_anastasis_api.c      |  6 +++---
 src/testing/test_anastasis_api.conf   |  2 ++
 src/testing/testing_api_cmd_config.c  |  9 ---------
 5 files changed, 28 insertions(+), 21 deletions(-)

diff --git a/src/restclient/anastasis_api_config.c 
b/src/restclient/anastasis_api_config.c
index 9eb6444..a7373b6 100644
--- a/src/restclient/anastasis_api_config.c
+++ b/src/restclient/anastasis_api_config.c
@@ -122,6 +122,16 @@ handle_config_finished (void *cls,
         GNUNET_break_op (0);
         break;
       }
+      if ( (GNUNET_OK !=
+            TALER_amount_cmp_currency (&acfg.liability_limit,
+                                       &acfg.annual_fee)) ||
+           (0 !=
+            strcasecmp (acfg.currency,
+                        acfg.annual_fee.currency)) )
+      {
+        GNUNET_JSON_parse_free (spec);
+        break;
+      }
       if (0 != strcmp (name,
                        "anastasis"))
       {
@@ -144,17 +154,21 @@ handle_config_finished (void *cls,
         {
           struct ANASTASIS_AuthorizationMethodConfig *m = &mcfg[i];
           struct GNUNET_JSON_Specification spec[] = {
-            GNUNET_JSON_spec_string ("name",
+            GNUNET_JSON_spec_string ("method",
                                      &m->name),
-            TALER_JSON_spec_amount ("usage_fee",
+            TALER_JSON_spec_amount ("cost",
                                     &m->usage_fee),
             GNUNET_JSON_spec_end ()
           };
 
-          if (GNUNET_OK !=
-              GNUNET_JSON_parse (json,
-                                 spec,
-                                 NULL, NULL))
+          if ( (GNUNET_OK !=
+                GNUNET_JSON_parse (json_array_get (methods,
+                                                   i),
+                                   spec,
+                                   NULL, NULL)) ||
+               (0 !=
+                strcasecmp (m->usage_fee.currency,
+                            acfg.currency)) )
           {
             GNUNET_break_op (0);
             GNUNET_JSON_parse_free (spec);
diff --git a/src/testing/test_anastasis.c b/src/testing/test_anastasis.c
index 206a8c6..834f778 100644
--- a/src/testing/test_anastasis.c
+++ b/src/testing/test_anastasis.c
@@ -180,9 +180,9 @@ run (void *cls,
   };
 
   struct TALER_TESTING_Command anastasis[] = {
-    ANASTASIS_TESTING_cmd_salt ("salt-request-1",
-                                anastasis_url,
-                                MHD_HTTP_OK),
+    ANASTASIS_TESTING_cmd_config ("salt-request-1",
+                                  anastasis_url,
+                                  MHD_HTTP_OK),
     ANASTASIS_TESTING_cmd_truth_upload_question ("truth-create-1",
                                                  anastasis_url,
                                                  id_data,
diff --git a/src/testing/test_anastasis_api.c b/src/testing/test_anastasis_api.c
index d8e074c..db18b41 100644
--- a/src/testing/test_anastasis_api.c
+++ b/src/testing/test_anastasis_api.c
@@ -299,9 +299,9 @@ run (void *cls,
                                                merchant_payto,
                                                "EUR",
                                                MHD_HTTP_NO_CONTENT),
-    ANASTASIS_TESTING_cmd_salt ("salt-request-1",
-                                anastasis_url,
-                                MHD_HTTP_OK),
+    ANASTASIS_TESTING_cmd_config ("salt-request-1",
+                                  anastasis_url,
+                                  MHD_HTTP_OK),
     TALER_TESTING_cmd_batch ("withdraw",
                              withdraw),
     TALER_TESTING_cmd_batch ("policy",
diff --git a/src/testing/test_anastasis_api.conf 
b/src/testing/test_anastasis_api.conf
index d2a0bec..2aa1850 100644
--- a/src/testing/test_anastasis_api.conf
+++ b/src/testing/test_anastasis_api.conf
@@ -44,6 +44,8 @@ PORT = 8086
 
 DB = postgres
 
+BUSINESS_NAME = "Checker's Test Inc."
+
 # Upload limit
 UPLOAD_LIMIT_MB = 1
 
diff --git a/src/testing/testing_api_cmd_config.c 
b/src/testing/testing_api_cmd_config.c
index b8e21a6..97e2396 100644
--- a/src/testing/testing_api_cmd_config.c
+++ b/src/testing/testing_api_cmd_config.c
@@ -182,15 +182,6 @@ config_traits (void *cls,
 }
 
 
-/**
- * Make the "config" command.
- *
- * @param label command label
- * @param anastasis_url base URL of the ANASTASIS serving
- *        the config request.
- * @param http_status expected HTTP status.
- * @return the command
- */
 struct TALER_TESTING_Command
 ANASTASIS_TESTING_cmd_config (const char *label,
                               const char *anastasis_url,

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