gnunet-svn
[Top][All Lists]
Advanced

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

[taler-donau] branch master updated: [testing] some changes


From: gnunet
Subject: [taler-donau] branch master updated: [testing] some changes
Date: Tue, 16 Jan 2024 13:58:34 +0100

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

lukas-matyja pushed a commit to branch master
in repository donau.

The following commit(s) were added to refs/heads/master by this push:
     new 774d506  [testing] some changes
     new e3d4b6e  Merge remote-tracking branch 'refs/remotes/origin/master'
774d506 is described below

commit 774d506cd09f0f321ec09890a5505aa3c89464fb
Author: Matyja Lukas Adam <lukas.matyja@students.bfh.ch>
AuthorDate: Tue Jan 16 13:59:07 2024 +0100

    [testing] some changes
---
 src/include/donau_service.h          | 26 ++++++--------------------
 src/lib/donau_api_curl_defaults.c    |  1 +
 src/lib/donau_api_curl_defaults.h    |  1 +
 src/lib/donau_api_handle.c           |  9 +++++----
 src/testing/test_api_cmd_get_donau.c | 27 ++++++++++++++-------------
 src/testing/test_donau_api.c         |  2 +-
 src/testing/testing_api_loop.c       | 14 +++++++-------
 7 files changed, 35 insertions(+), 45 deletions(-)

diff --git a/src/include/donau_service.h b/src/include/donau_service.h
index 2342800..03cc951 100644
--- a/src/include/donau_service.h
+++ b/src/include/donau_service.h
@@ -903,20 +903,6 @@ DONAU_charities_get_cancel (
 
 /* ********************* GET /charities/$CHARITY_ID *********************** */
 
-struct DONAU_CharityHistoryYear
-{
-  /**
-   * year
-   */
-  uint32_t year;
-
-  /**
-   * final donation amount at the end of @a year;
-   */
-  struct TALER_Amount final_amount;
-};
-
-
 /**
  * information of a charity
  */
@@ -930,22 +916,22 @@ struct DONAU_Charity
   /**
    * public key of the charity
    */
-  struct DONAU_CharitySignatureP pub_key;
+  struct DONAU_CharitySignatureP charity_pub;
 
   /**
-    * Max donation amout for this charitiy and year.
+    * Max donation amout for this charitiy and @e current_year.
     */
   struct TALER_Amount max_per_year;
 
   /**
-   * donation history
+   * Current amount of donation receipts for @e current_year.
    */
-  struct DONAU_CharityHistoryYear *donation_history;
+  struct TALER_Amount receipts_to_date;
 
   /**
-   * number of charity history years
+   * current year
    */
-  uint32_t num_hist;
+  uint32_t current_year;
 
 };
 
diff --git a/src/lib/donau_api_curl_defaults.c 
b/src/lib/donau_api_curl_defaults.c
index 3da27e9..8d34d1a 100644
--- a/src/lib/donau_api_curl_defaults.c
+++ b/src/lib/donau_api_curl_defaults.c
@@ -18,6 +18,7 @@
  * @file lib/donau_api_curl_defaults.c
  * @brief curl easy handle defaults
  * @author Florian Dold
+ * @author Lukas Matyja
  */
 
 #include "donau_api_curl_defaults.h"
diff --git a/src/lib/donau_api_curl_defaults.h 
b/src/lib/donau_api_curl_defaults.h
index a2c6298..9ebd24a 100644
--- a/src/lib/donau_api_curl_defaults.h
+++ b/src/lib/donau_api_curl_defaults.h
@@ -19,6 +19,7 @@
  * @file lib/donau_api_curl_defaults.h
  * @brief curl easy handle defaults
  * @author Florian Dold
+ * @author Lukas Matyja
  */
 
 #ifndef _TALER_CURL_DEFAULTS_H
diff --git a/src/lib/donau_api_handle.c b/src/lib/donau_api_handle.c
index 77e8058..75509d5 100644
--- a/src/lib/donau_api_handle.c
+++ b/src/lib/donau_api_handle.c
@@ -588,10 +588,11 @@ DONAU_get_keys (
   gkh->cert_cb = cert_cb;
   gkh->cert_cb_cls = cert_cb_cls;
   gkh->url = TALER_url_join (url,
-                             "keys");
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "Requesting keys with URL `%s'.\n",
-              gkh->url);
+                             "keys",
+                             NULL);
+  // GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+  //             "Requesting keys with URL `%s'.\n",
+  //             gkh->url);
   eh = DONAU_curl_easy_get_ (gkh->url);
   if (NULL == eh)
   {
diff --git a/src/testing/test_api_cmd_get_donau.c 
b/src/testing/test_api_cmd_get_donau.c
index 9d62eda..164cfc5 100644
--- a/src/testing/test_api_cmd_get_donau.c
+++ b/src/testing/test_api_cmd_get_donau.c
@@ -141,7 +141,7 @@ get_donau_run (void *cls,
     return;
   }
   if (! ges->wait_for_keys)
-    TALER_TESTING_interpreter_next (is);
+     TALER_TESTING_interpreter_next (is);
 }
 
 
@@ -165,6 +165,7 @@ get_donau_cleanup (void *cls,
   DONAU_keys_decref (ges->keys);
   ges->keys = NULL;
   GNUNET_free (ges->donau_url);
+  ges->donau_url = NULL;
   GNUNET_free (ges);
 }
 
@@ -225,19 +226,19 @@ static char *
 get_donau_base_url (
   const struct GNUNET_CONFIGURATION_Handle *cfg)
 {
-  char *donau_url;
+  char *donau_url = "http://localhost:8080/";;
 
-  if (GNUNET_OK !=
-      GNUNET_CONFIGURATION_get_value_string (cfg,
-                                             "donau",
-                                             "BASE_URL",
-                                             &donau_url))
-  {
-    GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
-                               "donau",
-                               "BASE_URL");
-    return NULL;
-  }
+  // if (GNUNET_OK !=
+  //     GNUNET_CONFIGURATION_get_value_string (cfg,
+  //                                            "donau",
+  //                                            "BASE_URL",
+  //                                            &donau_url))
+  // {
+  //   GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
+  //                              "donau",
+  //                              "BASE_URL");
+  //   return NULL;
+  // }
   return donau_url;
 }
 
diff --git a/src/testing/test_donau_api.c b/src/testing/test_donau_api.c
index 69f2ecf..d99da9b 100644
--- a/src/testing/test_donau_api.c
+++ b/src/testing/test_donau_api.c
@@ -1,6 +1,6 @@
 /*
   This file is part of TALER
-  Copyright (C) 2014--2024 Taler Systems SA
+  Copyright (C) 2014-2024 Taler Systems SA
 
   TALER is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as
diff --git a/src/testing/testing_api_loop.c b/src/testing/testing_api_loop.c
index c60cffc..3b9acaf 100644
--- a/src/testing/testing_api_loop.c
+++ b/src/testing/testing_api_loop.c
@@ -54,13 +54,13 @@ DONAU_TESTING_main (char *const *argv,
   //  GNUNET_break (0);
   //  return 77;
   //}
-  if (GNUNET_OK !=
-     TALER_TESTING_cleanup_files_cfg (NULL,
-                                      cred->cfg))
-  {
-    GNUNET_break (0);
-    return 77;
-  }
+  // if (GNUNET_OK !=
+  //    TALER_TESTING_cleanup_files_cfg (NULL,
+  //                                     cred->cfg))
+  // {
+  //   GNUNET_break (0);
+  //   return 77;
+  // }
   ret = TALER_TESTING_loop (main_cb,
                             main_cb_cls);
   /* TODO: should we free 'cred' resources here? */

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