gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [taler-donau] branch master updated: [testing] charity post some changes
Date: Wed, 06 Mar 2024 10:37:23 +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 fa32efc  [testing] charity post some changes
fa32efc is described below

commit fa32efcd5c7aff8be7bebca785279d7289edc019
Author: Matyja Lukas Adam <lukas.matyja@students.bfh.ch>
AuthorDate: Wed Mar 6 10:38:04 2024 +0100

    [testing] charity post some changes
---
 src/testing/test_donau_api.c               | 28 ++++++++---------
 src/testing/testing_api_cmd_charity_post.c | 48 +++++++++++++++---------------
 2 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/src/testing/test_donau_api.c b/src/testing/test_donau_api.c
index 8d93527..c944c19 100644
--- a/src/testing/test_donau_api.c
+++ b/src/testing/test_donau_api.c
@@ -84,25 +84,25 @@ run (void *cls,
 //                                      cred.cfg,
 //                                      true,
 //                                      true),
-//       TALER_TESTING_cmd_charity_post ("post-charity",
-//                                                                       
"EBETNXT9ZF606FRF3WD5N6G2XVD5QHDP2PTQD4GSX4VEN2YYG2C0",
-//                                                                       
"example",
-//                                                                       
"example.com",
-//                                                                       
"EUR:10", // max_per_year
-//                                                                       
"EUR:0", // receipts_to_date
-//                                                                       2024, 
// current year
-//                                                                       
bearer,
-//                                                                       
MHD_HTTP_NO_CONTENT),
+         TALER_TESTING_cmd_charity_post ("post-charity",
+                                                                         
"EBETNXT9ZF606FRF3WD5N6G2XVD5QHDP2PTQD4GSX4VEN2YYG2C0",
+                                                                         
"example",
+                                                                         
"example.com",
+                                                                         
"EUR:10", // max_per_year
+                                                                         
"EUR:0", // receipts_to_date
+                                                                         2024, 
// current year
+                                                                         
bearer,
+                                                                         
MHD_HTTP_NO_CONTENT),
       TALER_TESTING_cmd_charity_get ("get-charity-by-id",
-                                                                 4,
+                                                                 5,
                                                                          
bearer,
                                       MHD_HTTP_OK),
          TALER_TESTING_cmd_charities_get ("get-charities",
                                                                          
MHD_HTTP_OK),
-         TALER_TESTING_cmd_charity_delete("delete-charity",
-                                                                         4,
-                                                                         
bearer,
-                                                                         
MHD_HTTP_NO_CONTENT),
+//       TALER_TESTING_cmd_charity_delete("delete-charity",
+//                                                                       5,
+//                                                                       
bearer,
+//                                                                       
MHD_HTTP_NO_CONTENT),
 
          //TODO: test POST charity, DELETE charity
       /* End the suite. */
diff --git a/src/testing/testing_api_cmd_charity_post.c 
b/src/testing/testing_api_cmd_charity_post.c
index 2518785..e33d99d 100644
--- a/src/testing/testing_api_cmd_charity_post.c
+++ b/src/testing/testing_api_cmd_charity_post.c
@@ -156,32 +156,32 @@ TALER_TESTING_cmd_charity_post (const char *label,
 {
   struct StatusState *ss;
   ss = GNUNET_new (struct StatusState);
-  //memcpy(ss->charity_req->charity_pub.eddsa_pub.q_y, charity_pub, 
(256/8)*sizeof(char));
-  //ss->charity_req->name = GNUNET_strdup (name);
-  //ss->charity_req->charity_url = GNUNET_strdup (url);
+  GNUNET_memcpy(&ss->charity_req->charity_pub.eddsa_pub.q_y, charity_pub, 
sizeof(ss->charity_req->charity_pub.eddsa_pub.q_y));
+  ss->charity_req->name = GNUNET_strdup (name);
+  ss->charity_req->charity_url = GNUNET_strdup (url);
   // parse string max_per_year to amount
-//  if (GNUNET_OK !=
-//      TALER_string_to_amount (max_per_year,
-//                              &ss->charity_req->max_per_year))
-//  {
-//    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-//                "Failed to parse amount `%s' at %s\n",
-//                             max_per_year,
-//                label);
-//    GNUNET_assert (0);
-//  }
+  if (GNUNET_OK !=
+      TALER_string_to_amount (max_per_year,
+                              &ss->charity_req->max_per_year))
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "Failed to parse amount `%s' at %s\n",
+                               max_per_year,
+                label);
+    GNUNET_assert (0);
+  }
   // parse string receipts_to_date to amount
-//  if (GNUNET_OK !=
-//      TALER_string_to_amount (receipts_to_date,
-//                              &ss->charity_req->receipts_to_date))
-//  {
-//    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-//                "Failed to parse amount `%s' at %s\n",
-//                             receipts_to_date,
-//                label);
-//    GNUNET_assert (0);
-//  }
-//  ss->charity_req->current_year = current_year;
+  if (GNUNET_OK !=
+      TALER_string_to_amount (receipts_to_date,
+                              &ss->charity_req->receipts_to_date))
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "Failed to parse amount `%s' at %s\n",
+                               receipts_to_date,
+                label);
+    GNUNET_assert (0);
+  }
+  ss->charity_req->current_year = current_year;
   ss->expected_response_code = expected_response_code;
   ss->bearer = bearer;
   {

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