gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated (f02775e2 -> 15489275)


From: gnunet
Subject: [taler-exchange] branch master updated (f02775e2 -> 15489275)
Date: Thu, 19 Mar 2020 17:56:26 +0100

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

grothoff pushed a change to branch master
in repository exchange.

    from f02775e2 remove debug logic
     new fd29d186 type fixes
     new 15489275 make DB reset optional in API, use it in tests, but not in 
the benchmark

The 2 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:
 src/benchmark/taler-exchange-benchmark.c             |  1 +
 src/exchangedb/test_exchangedb_denomkeys.c           |  4 ++--
 src/include/taler_testing_lib.h                      |  2 ++
 src/json/json.c                                      |  1 +
 src/testing/test_auditor_api.c                       |  1 +
 src/testing/test_exchange_api.c                      |  1 +
 src/testing/test_exchange_api_keys_cherry_picking.c  |  1 +
 src/testing/test_exchange_api_overlapping_keys_bug.c |  1 +
 src/testing/test_exchange_api_revocation.c           |  1 +
 src/testing/test_taler_exchange_aggregator.c         |  1 +
 src/testing/test_taler_exchange_wirewatch.c          |  1 +
 src/testing/testing_api_helpers_exchange.c           | 17 +++++++++++------
 12 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/src/benchmark/taler-exchange-benchmark.c 
b/src/benchmark/taler-exchange-benchmark.c
index 5deb5f58..f5a1649b 100644
--- a/src/benchmark/taler-exchange-benchmark.c
+++ b/src/benchmark/taler-exchange-benchmark.c
@@ -952,6 +952,7 @@ main (int argc,
 
     GNUNET_assert (GNUNET_OK ==
                    TALER_TESTING_prepare_exchange (cfg_filename,
+                                                   GNUNET_NO,
                                                    &ec));
   }
   else
diff --git a/src/exchangedb/test_exchangedb_denomkeys.c 
b/src/exchangedb/test_exchangedb_denomkeys.c
index 4dd01d26..0b3c7177 100644
--- a/src/exchangedb/test_exchangedb_denomkeys.c
+++ b/src/exchangedb/test_exchangedb_denomkeys.c
@@ -110,13 +110,13 @@ main (int argc,
       const char *const argv[])
 {
   struct TALER_EXCHANGEDB_DenominationKey dki;
-  char *enc;
+  void *enc;
   size_t enc_size;
   struct TALER_EXCHANGEDB_DenominationKey dki_read;
   struct GNUNET_CRYPTO_EddsaPrivateKey *pk;
   struct TALER_MasterPrivateKeyP master_priv;
   struct TALER_MasterPublicKeyP master_pub;
-  char *enc_read;
+  void *enc_read;
   size_t enc_read_size;
   char *tmpfile;
   char *tmpdir;
diff --git a/src/include/taler_testing_lib.h b/src/include/taler_testing_lib.h
index 62f0b95c..b9105797 100644
--- a/src/include/taler_testing_lib.h
+++ b/src/include/taler_testing_lib.h
@@ -118,12 +118,14 @@ struct TALER_TESTING_DatabaseConnection
  * launch the exchange process itself.
  *
  * @param config_filename configuration file to use
+ * @param reset_db should we reset the database
  * @param[out] ec will be set to the exchange configuration data
  * @return #GNUNET_OK on success, #GNUNET_NO if test should be
  *         skipped, #GNUNET_SYSERR on test failure
  */
 int
 TALER_TESTING_prepare_exchange (const char *config_filename,
+                                int reset_db,
                                 struct TALER_TESTING_ExchangeConfiguration 
*ec);
 
 
diff --git a/src/json/json.c b/src/json/json.c
index f0c0aff5..01a5bfe2 100644
--- a/src/json/json.c
+++ b/src/json/json.c
@@ -73,6 +73,7 @@ TALER_JSON_get_error_code (const json_t *json)
 
   if (NULL == json)
   {
+    abort ();
     GNUNET_break_op (0);
     return TALER_EC_INVALID_RESPONSE;
   }
diff --git a/src/testing/test_auditor_api.c b/src/testing/test_auditor_api.c
index af6f8203..eea676bd 100644
--- a/src/testing/test_auditor_api.c
+++ b/src/testing/test_auditor_api.c
@@ -683,6 +683,7 @@ main (int argc,
    * fetches the port number from config in order to see
    * if it's available. */
   switch (TALER_TESTING_prepare_exchange (CONFIG_FILE,
+                                          GNUNET_YES,
                                           &ec))
   {
   case GNUNET_SYSERR:
diff --git a/src/testing/test_exchange_api.c b/src/testing/test_exchange_api.c
index 3f7a1aed..0913688a 100644
--- a/src/testing/test_exchange_api.c
+++ b/src/testing/test_exchange_api.c
@@ -809,6 +809,7 @@ main (int argc,
    * fetches the port number from config in order to see
    * if it's available. */
   switch (TALER_TESTING_prepare_exchange (CONFIG_FILE,
+                                          GNUNET_YES,
                                           &ec))
   {
   case GNUNET_SYSERR:
diff --git a/src/testing/test_exchange_api_keys_cherry_picking.c 
b/src/testing/test_exchange_api_keys_cherry_picking.c
index 47a6472a..69d7e80c 100644
--- a/src/testing/test_exchange_api_keys_cherry_picking.c
+++ b/src/testing/test_exchange_api_keys_cherry_picking.c
@@ -237,6 +237,7 @@ main (int argc,
    * fetches the port number from config in order to see
    * if it's available. */
   switch (TALER_TESTING_prepare_exchange (CONFIG_FILE,
+                                          GNUNET_YES,
                                           &ec))
   {
   case GNUNET_SYSERR:
diff --git a/src/testing/test_exchange_api_overlapping_keys_bug.c 
b/src/testing/test_exchange_api_overlapping_keys_bug.c
index f63d5da7..cfe33d51 100644
--- a/src/testing/test_exchange_api_overlapping_keys_bug.c
+++ b/src/testing/test_exchange_api_overlapping_keys_bug.c
@@ -101,6 +101,7 @@ main (int argc,
    * fetches the port number from config in order to see
    * if it's available. */
   switch (TALER_TESTING_prepare_exchange (CONFIG_FILE,
+                                          GNUNET_YES,
                                           &ec))
   {
   case GNUNET_SYSERR:
diff --git a/src/testing/test_exchange_api_revocation.c 
b/src/testing/test_exchange_api_revocation.c
index 27a750d4..467b93e9 100644
--- a/src/testing/test_exchange_api_revocation.c
+++ b/src/testing/test_exchange_api_revocation.c
@@ -212,6 +212,7 @@ main (int argc,
    * fetches the port number from config in order to see
    * if it's available. */
   switch (TALER_TESTING_prepare_exchange (CONFIG_FILE,
+                                          GNUNET_YES,
                                           &ec))
   {
   case GNUNET_SYSERR:
diff --git a/src/testing/test_taler_exchange_aggregator.c 
b/src/testing/test_taler_exchange_aggregator.c
index fe96d635..7f03d8db 100644
--- a/src/testing/test_taler_exchange_aggregator.c
+++ b/src/testing/test_taler_exchange_aggregator.c
@@ -528,6 +528,7 @@ main (int argc,
   TALER_TESTING_cleanup_files (config_filename);
 
   if (GNUNET_OK != TALER_TESTING_prepare_exchange (config_filename,
+                                                   GNUNET_YES,
                                                    &ec))
   {
     TALER_LOG_WARNING ("Could not prepare the exchange.\n");
diff --git a/src/testing/test_taler_exchange_wirewatch.c 
b/src/testing/test_taler_exchange_wirewatch.c
index 34d70190..6d7a144e 100644
--- a/src/testing/test_taler_exchange_wirewatch.c
+++ b/src/testing/test_taler_exchange_wirewatch.c
@@ -170,6 +170,7 @@ main (int argc,
 
   TALER_TESTING_cleanup_files (config_filename);
   if (GNUNET_OK != TALER_TESTING_prepare_exchange (config_filename,
+                                                   GNUNET_YES,
                                                    &ec))
   {
     TALER_LOG_INFO ("Could not prepare the exchange\n");
diff --git a/src/testing/testing_api_helpers_exchange.c 
b/src/testing/testing_api_helpers_exchange.c
index 9f571684..bed6bc8d 100644
--- a/src/testing/testing_api_helpers_exchange.c
+++ b/src/testing/testing_api_helpers_exchange.c
@@ -490,12 +490,14 @@ fail:
  * launch the exchange process itself.
  *
  * @param config_filename configuration file to use
+ * @param reset_db should we reset the database?
  * @param[out] ec will be set to the exchange configuration data
  * @return #GNUNET_OK on success, #GNUNET_NO if test should be
  *         skipped, #GNUNET_SYSERR on test failure
  */
 int
 TALER_TESTING_prepare_exchange (const char *config_filename,
+                                int reset_db,
                                 struct TALER_TESTING_ExchangeConfiguration *ec)
 {
   struct SignInfo si = {
@@ -508,12 +510,15 @@ TALER_TESTING_prepare_exchange (const char 
*config_filename,
       TALER_TESTING_run_keyup (config_filename,
                                si.auditor_sign_input_filename))
     return GNUNET_NO;
-  if (GNUNET_OK !=
-      TALER_TESTING_exchange_db_reset (config_filename))
-    return GNUNET_NO;
-  if (GNUNET_OK !=
-      TALER_TESTING_auditor_db_reset (config_filename))
-    return GNUNET_NO;
+  if (GNUNET_YES == reset_db)
+  {
+    if (GNUNET_OK !=
+        TALER_TESTING_exchange_db_reset (config_filename))
+      return GNUNET_NO;
+    if (GNUNET_OK !=
+        TALER_TESTING_auditor_db_reset (config_filename))
+      return GNUNET_NO;
+  }
   if (GNUNET_OK !=
       GNUNET_CONFIGURATION_parse_and_run (config_filename,
                                           &sign_keys_for_exchange,

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]