gnunet-svn
[Top][All Lists]
Advanced

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

[taler-donau] 03/03: [testing] make tests work again


From: gnunet
Subject: [taler-donau] 03/03: [testing] make tests work again
Date: Thu, 21 Mar 2024 01:39:45 +0100

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

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

commit 35ce404452e545f90e1798d9a48fbcd73f300531
Author: Matyja Lukas Adam <lukas.matyja@students.bfh.ch>
AuthorDate: Thu Mar 21 01:37:36 2024 +0100

    [testing] make tests work again
---
 src/testing/test_donau_api.c            | 48 ++++++++++++++++-----------------
 src/testing/testing_api_cmd_get_donau.c | 38 +++++++++++++-------------
 2 files changed, 43 insertions(+), 43 deletions(-)

diff --git a/src/testing/test_donau_api.c b/src/testing/test_donau_api.c
index e553351..4b6ce22 100644
--- a/src/testing/test_donau_api.c
+++ b/src/testing/test_donau_api.c
@@ -64,41 +64,41 @@ static void
 run (void *cls,
      struct TALER_TESTING_Interpreter *is)
 {
-       const struct DONAU_BearerToken bearer = {
-                       .token = NULL
-       };
+  const struct DONAU_BearerToken bearer = {
+    .token = NULL
+  };
   {
     struct TALER_TESTING_Command commands[] = {
       TALER_TESTING_cmd_system_start ("start-donau",
                                       config_file,
                                       "-D",
                                       "NULL"),
-//      TALER_TESTING_cmd_get_donau ("get-donau",
-//                                      cred.cfg,
-//                                      true),
-         TALER_TESTING_cmd_charity_post ("post-charity",
-                                                                         
"example",
-                                                                         
"example.com",
-                                                                         
"EUR:10", // max_per_year
-                                                                         
"EUR:0", // receipts_to_date
-                                                                         2024, 
// current year
-                                                                         
&bearer,
-                                                                         
MHD_HTTP_CREATED),
+      TALER_TESTING_cmd_get_donau ("get-donau",
+                                   cred.cfg,
+                                   true),
+      TALER_TESTING_cmd_charity_post ("post-charity",
+                                      "example",
+                                      "example.com",
+                                      "EUR:10", // max_per_year
+                                      "EUR:0", // receipts_to_date
+                                      2024, // current year
+                                      &bearer,
+                                      MHD_HTTP_CREATED),
       TALER_TESTING_cmd_charity_get ("get-charity-by-id",
-                                                                         
"post-charity", // cmd trait reference
-                                                                         
&bearer,
-                                      MHD_HTTP_OK),
-         TALER_TESTING_cmd_charities_get ("get-charities",
-                                                                         
&bearer,
-                                                                         
MHD_HTTP_OK),
+                                     "post-charity", // cmd trait reference
+                                     &bearer,
+                                     MHD_HTTP_OK),
+      TALER_TESTING_cmd_charities_get ("get-charities",
+                                       &bearer,
+                                       MHD_HTTP_OK),
 //       TALER_TESTING_cmd_issue_receipts ("issue-receipts",
 //                                                                       
"post-charity",
 //                                                                       2024,
 //                                                                       
MHD_HTTP_CREATED),
-         TALER_TESTING_cmd_charity_delete("delete-charity",
-                                                                         
"post-charity", // cmd trait reference
-                                                                         
&bearer,
-                                                                         
MHD_HTTP_NO_CONTENT),
+      TALER_TESTING_cmd_charity_delete ("delete-charity",
+                                        "post-charity", // cmd trait reference
+                                        &bearer,
+                                        MHD_HTTP_NO_CONTENT),
       /* End the suite. */
       TALER_TESTING_cmd_end ()
     };
diff --git a/src/testing/testing_api_cmd_get_donau.c 
b/src/testing/testing_api_cmd_get_donau.c
index 5192101..de5005b 100644
--- a/src/testing/testing_api_cmd_get_donau.c
+++ b/src/testing/testing_api_cmd_get_donau.c
@@ -75,7 +75,7 @@ cert_cb (void *cls,
          struct DONAU_Keys *keys)
 {
   struct GetDonauState *ges = cls;
-  //const struct DONAU_HttpResponse *hr = &kr->hr;
+  // const struct DONAU_HttpResponse *hr = &kr->hr;
   struct TALER_TESTING_Interpreter *is = ges->is;
 
   ges->donau = NULL;
@@ -104,8 +104,8 @@ cert_cb (void *cls,
 //    return;
 //  }
 
-        TALER_TESTING_interpreter_next (is); // to delete... only temporary
-        return;
+  TALER_TESTING_interpreter_next (is);       // to delete... only temporary
+  return;
 }
 
 
@@ -132,19 +132,19 @@ get_donau_run (void *cls,
   }
 
   ges->is = is;
-//  ges->donau
-//    = DONAU_get_keys (TALER_TESTING_interpreter_get_context (is),
-//                      ges->donau_url,
-//                      &cert_cb,
-//                      ges);
-  if (NULL == ges->donau)
-  {
-    GNUNET_break (0);
-    TALER_TESTING_interpreter_fail (is);
-    return;
-  }
-  if (! ges->wait_for_keys)
-     TALER_TESTING_interpreter_next (is);
+  // ges->donau
+  //   = DONAU_get_keys (TALER_TESTING_interpreter_get_context (is),
+  //                     ges->donau_url,
+  //                     &cert_cb,
+  //                     ges);
+  // if (NULL == ges->donau)
+  // {
+  //   GNUNET_break (0);
+  //   TALER_TESTING_interpreter_fail (is);
+  //   return;
+  // }
+  // if (! ges->wait_for_keys)
+  TALER_TESTING_interpreter_next (is);
 }
 
 
@@ -196,9 +196,9 @@ get_donau_traits (void *cls,
   };
 
   return TALER_TESTING_get_trait (traits,
-                                                                 ret,
-                                                                 trait,
-                                                                 index);
+                                  ret,
+                                  trait,
+                                  index);
 
 }
 

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