gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated (c9402961 -> cd6a3b8d)


From: gnunet
Subject: [taler-exchange] branch master updated (c9402961 -> cd6a3b8d)
Date: Wed, 16 Dec 2020 19:58:44 +0100

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

grothoff pushed a change to branch master
in repository exchange.

    from c9402961 need to have fees for wire tool tests, too
     new 9d3e052a enable more test logic
     new 9745e82c aggregator test now does also needs exchange running, if only 
to post the fees initially
     new cd6a3b8d fix config for aggregator test

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../test-taler-exchange-aggregator-postgres.conf   | 15 +++++++-
 src/testing/test_exchange_management_api.c         |  2 -
 src/testing/test_taler_exchange_aggregator.c       | 44 ++++++++--------------
 src/testing/testing_api_helpers_exchange.c         |  6 +++
 4 files changed, 35 insertions(+), 32 deletions(-)

diff --git a/src/testing/test-taler-exchange-aggregator-postgres.conf 
b/src/testing/test-taler-exchange-aggregator-postgres.conf
index d4252e23..dd03e0c4 100644
--- a/src/testing/test-taler-exchange-aggregator-postgres.conf
+++ b/src/testing/test-taler-exchange-aggregator-postgres.conf
@@ -19,7 +19,9 @@ MASTER_PUBLIC_KEY = 
98NJW3CQHZQGQXTY3K85K531XKPAPAVV4Q5V8PYYRR00NJGZWNVG
 
 # Expected base URL of the exchange.  Used in wire transfers for
 # the tracking API.
-BASE_URL = "https://exchange.taler.net/";
+BASE_URL = "http://localhost:8081/";
+
+SIGNKEY_LEGAL_DURATION = 2 years
 
 [auditor]
 BASE_URL = "http://auditor.example.com/";
@@ -96,3 +98,14 @@ CLOSING-FEE-2024 = EUR:0.01
 CLOSING-FEE-2025 = EUR:0.01
 CLOSING-FEE-2026 = EUR:0.01
 CLOSING-FEE-2027 = EUR:0.01
+
+[coin_eur_ct_1]
+value = EUR:0.01
+duration_withdraw = 7 days
+duration_spend = 2 years
+duration_legal = 3 years
+fee_withdraw = EUR:0.00
+fee_deposit = EUR:0.00
+fee_refresh = EUR:0.01
+fee_refund = EUR:0.01
+rsa_keysize = 1024
diff --git a/src/testing/test_exchange_management_api.c 
b/src/testing/test_exchange_management_api.c
index e2d1b822..0cf96823 100644
--- a/src/testing/test_exchange_management_api.c
+++ b/src/testing/test_exchange_management_api.c
@@ -57,13 +57,11 @@ run (void *cls,
      struct TALER_TESTING_Interpreter *is)
 {
   struct TALER_TESTING_Command commands[] = {
-#if FIXME_MIGRATION_DONE
     /* this currently fails, because the
        auditor is already added by the test setup logic */
     TALER_TESTING_cmd_auditor_del ("del-auditor-NOT-FOUND",
                                    MHD_HTTP_NOT_FOUND,
                                    false),
-#endif
     TALER_TESTING_cmd_auditor_add ("add-auditor-BAD-SIG",
                                    MHD_HTTP_FORBIDDEN,
                                    true),
diff --git a/src/testing/test_taler_exchange_aggregator.c 
b/src/testing/test_taler_exchange_aggregator.c
index 9d9d4e7a..2b3d642e 100644
--- a/src/testing/test_taler_exchange_aggregator.c
+++ b/src/testing/test_taler_exchange_aggregator.c
@@ -475,8 +475,6 @@ run (void *cls,
     TALER_TESTING_cmd_end ()
   };
 
-  GNUNET_SCHEDULER_add_shutdown (&unload_db,
-                                 NULL);
   TALER_TESTING_run_with_fakebank (is,
                                    all,
                                    bc.exchange_auth.wire_gateway_url);
@@ -484,42 +482,29 @@ 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;
-  }
-  if (GNUNET_OK !=
-      dbc.plugin->create_tables (dbc.plugin->cls))
-  {
-    GNUNET_break (0);
-    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;
+  GNUNET_SCHEDULER_add_shutdown (&unload_db,
+                                 NULL);
+  run (NULL,
+       is);
 }
 
 
@@ -570,10 +555,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;
diff --git a/src/testing/testing_api_helpers_exchange.c 
b/src/testing/testing_api_helpers_exchange.c
index 043bf8a0..f3a713af 100644
--- a/src/testing/testing_api_helpers_exchange.c
+++ b/src/testing/testing_api_helpers_exchange.c
@@ -723,6 +723,12 @@ TALER_TESTING_setup_with_exchange_cfg (
   {
     GNUNET_free (base_url);
     stop_helpers (helpers);
+    GNUNET_break (0 ==
+                  GNUNET_OS_process_kill (exchanged,
+                                          SIGTERM));
+    GNUNET_break (GNUNET_OK ==
+                  GNUNET_OS_process_wait (exchanged));
+    GNUNET_OS_process_destroy (exchanged);
     return 77;
   }
   GNUNET_free (base_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]