gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] 02/03: aggregator test now does also needs exchange run


From: gnunet
Subject: [taler-exchange] 02/03: aggregator test now does also needs exchange running, if only to post the fees initially
Date: Wed, 16 Dec 2020 19:58:46 +0100

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

grothoff pushed a commit to branch master
in repository exchange.

commit 9745e82c59a4b6f96b4611cde82ac90f1f6c30ba
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Wed Dec 16 19:40:33 2020 +0100

    aggregator test now does also needs exchange running, if only to post the 
fees initially
---
 .../test-taler-exchange-aggregator-postgres.conf   |  2 ++
 src/testing/test_taler_exchange_aggregator.c       | 33 ++++++++++------------
 2 files changed, 17 insertions(+), 18 deletions(-)

diff --git a/src/testing/test-taler-exchange-aggregator-postgres.conf 
b/src/testing/test-taler-exchange-aggregator-postgres.conf
index d4252e23..e188f508 100644
--- a/src/testing/test-taler-exchange-aggregator-postgres.conf
+++ b/src/testing/test-taler-exchange-aggregator-postgres.conf
@@ -21,6 +21,8 @@ MASTER_PUBLIC_KEY = 
98NJW3CQHZQGQXTY3K85K531XKPAPAVV4Q5V8PYYRR00NJGZWNVG
 # the tracking API.
 BASE_URL = "https://exchange.taler.net/";
 
+SIGNKEY_LEGAL_DURATION = 2 years
+
 [auditor]
 BASE_URL = "http://auditor.example.com/";
 
diff --git a/src/testing/test_taler_exchange_aggregator.c 
b/src/testing/test_taler_exchange_aggregator.c
index 9d9d4e7a..6d057c37 100644
--- a/src/testing/test_taler_exchange_aggregator.c
+++ b/src/testing/test_taler_exchange_aggregator.c
@@ -484,23 +484,22 @@ run (void *cls,
 
 
 /**
- * Prepare database an launch the test.
+ * Prepare database and launch the test.
  *
  * @param cls unused
- * @param cfg our configuration
- * @return #GNUNET_NO if database could not be prepared,
- * otherwise #GNUNET_OK
+ * @param is interpreter to use
  */
-static int
+static void
 prepare_database (void *cls,
-                  const struct GNUNET_CONFIGURATION_Handle *cfg)
+                  struct TALER_TESTING_Interpreter *is)
 {
-  dbc.plugin = TALER_EXCHANGEDB_plugin_load (cfg);
+  dbc.plugin = TALER_EXCHANGEDB_plugin_load (is->cfg);
   if (NULL == dbc.plugin)
   {
     GNUNET_break (0);
     result = 77;
-    return GNUNET_NO;
+    TALER_TESTING_interpreter_fail (is);
+    return;
   }
   if (GNUNET_OK !=
       dbc.plugin->create_tables (dbc.plugin->cls))
@@ -509,17 +508,14 @@ prepare_database (void *cls,
     TALER_EXCHANGEDB_plugin_unload (dbc.plugin);
     dbc.plugin = NULL;
     result = 77;
-    return GNUNET_NO;
+    TALER_TESTING_interpreter_fail (is);
+    return;
   }
   dbc.session = dbc.plugin->get_session (dbc.plugin->cls);
   GNUNET_assert (NULL != dbc.session);
 
-  result = TALER_TESTING_setup (&run,
-                                NULL,
-                                cfg,
-                                NULL, // no exchange process handle.
-                                GNUNET_NO); // do not try to connect to the 
exchange
-  return GNUNET_OK;
+  run (NULL,
+       is);
 }
 
 
@@ -570,10 +566,11 @@ main (int argc,
     TALER_LOG_WARNING ("Could not prepare the fakebank\n");
     return 77;
   }
+  result = GNUNET_OK;
   if (GNUNET_OK !=
-      GNUNET_CONFIGURATION_parse_and_run (config_filename,
-                                          &prepare_database,
-                                          NULL))
+      TALER_TESTING_setup_with_exchange (&prepare_database,
+                                         NULL,
+                                         config_filename))
   {
     TALER_LOG_WARNING ("Could not prepare database for tests.\n");
     return result;

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