gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated (71eeb72b -> a3b193ff)


From: gnunet
Subject: [taler-exchange] branch master updated (71eeb72b -> a3b193ff)
Date: Sat, 06 Jun 2020 02:05:09 +0200

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

ms pushed a change to branch master
in repository exchange.

    from 71eeb72b nexus-based tests
     new 14b001fe place nexus/sandbox sqlite3 DBs under /tmp,
     new a3b193ff no need to double check nexus' user creation

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:
 contrib/taler-nexus-prepare            | 10 +++++--
 src/testing/testing_api_helpers_bank.c | 49 +++++-----------------------------
 2 files changed, 15 insertions(+), 44 deletions(-)

diff --git a/contrib/taler-nexus-prepare b/contrib/taler-nexus-prepare
index 23dbf6d7..d7466fcf 100755
--- a/contrib/taler-nexus-prepare
+++ b/contrib/taler-nexus-prepare
@@ -36,8 +36,14 @@ def assertResponse(response):
     return response
 
 # Create a nexus (super-) user
-call(["nexus", "superuser", "Exchange", "--password", "x"])
-# Create a loopback bank connection.
+call(["nexus",
+      "superuser",
+      "--db-name", "/tmp/nexus-exchange-test.sqlite3",
+      "Exchange",
+      "--password", "x"]
+)
+
+# Create a EBICS bank connection.
 assertResponse(
     post(
         "http://localhost:5001/bank-connections";,
diff --git a/src/testing/testing_api_helpers_bank.c 
b/src/testing/testing_api_helpers_bank.c
index da66493d..c2e9f0a9 100644
--- a/src/testing/testing_api_helpers_bank.c
+++ b/src/testing/testing_api_helpers_bank.c
@@ -125,6 +125,7 @@ TALER_TESTING_run_libeufin (const struct 
TALER_TESTING_BankConfiguration *bc)
                 "nexus",
                 "nexus",
                 "serve",
+                "--db-name", "/tmp/nexus-exchange-test.sqlite3",
                 NULL);
   if (NULL == nexus_proc)
   {
@@ -169,6 +170,8 @@ TALER_TESTING_run_libeufin (const struct 
TALER_TESTING_BankConfiguration *bc)
                    NULL, NULL, NULL,
                    "sandbox",
                    "sandbox",
+                   "serve",
+                   "--db-name", "/tmp/sandbox-exchange-test.sqlite3",
                    NULL);
   if (NULL == sandbox_proc)
   {
@@ -210,6 +213,7 @@ TALER_TESTING_run_libeufin (const struct 
TALER_TESTING_BankConfiguration *bc)
     GNUNET_OS_process_kill (sandbox_proc, SIGTERM);
     GNUNET_OS_process_wait (sandbox_proc);
     GNUNET_OS_process_destroy (sandbox_proc);
+    TALER_LOG_ERROR ("Could not prepare nexus\n");
     GNUNET_break (0);
     return ret;
   }
@@ -353,9 +357,6 @@ TALER_TESTING_prepare_nexus (const char *config_filename,
 {
   struct GNUNET_CONFIGURATION_Handle *cfg;
   unsigned long long port;
-  struct GNUNET_OS_Process *dbreset_proc;
-  enum GNUNET_OS_ProcessStatusType type;
-  unsigned long code;
   char *database = NULL; // silence compiler
   char *exchange_payto_uri;
 
@@ -413,15 +414,7 @@ TALER_TESTING_prepare_nexus (const char *config_filename,
   /* DB preparation */
   if (GNUNET_YES == reset_db)
   {
-    if (NULL ==
-        (dbreset_proc = GNUNET_OS_start_process (
-           GNUNET_NO,
-           GNUNET_OS_INHERIT_STD_NONE,
-           NULL, NULL, NULL,
-           "rm",
-           "rm",
-           "-f",
-           "libeufin-nexus.sqlite3", NULL)))
+    if (0 != system ("rm -f /tmp/nexus-exchange-test.sqlite3 && rm -f 
/tmp/sandbox-exchange-test.sqlite3"))
     {
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                   "Failed to invoke db-removal command.\n");
@@ -429,36 +422,8 @@ TALER_TESTING_prepare_nexus (const char *config_filename,
       GNUNET_CONFIGURATION_destroy (cfg);
       return GNUNET_SYSERR;
     }
-    if (GNUNET_SYSERR ==
-        GNUNET_OS_process_wait_status (dbreset_proc,
-                                       &type,
-                                       &code))
-    {
-      GNUNET_OS_process_destroy (dbreset_proc);
-      GNUNET_break (0);
-      GNUNET_CONFIGURATION_destroy (cfg);
-      return GNUNET_SYSERR;
-    }
-    if ( (type == GNUNET_OS_PROCESS_EXITED) &&
-         (0 != code) )
-    {
-      fprintf (stderr,
-               "db-removal command was unsuccessful\n");
-      GNUNET_break (0);
-      GNUNET_CONFIGURATION_destroy (cfg);
-      return GNUNET_SYSERR;
-    }
-    if ( (type != GNUNET_OS_PROCESS_EXITED) ||
-         (0 != code) )
-    {
-      GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                  "Unexpected error running `rm libeufin-nexus.sqlite3'!\n");
-      GNUNET_break (0);
-      GNUNET_CONFIGURATION_destroy (cfg);
-      return GNUNET_SYSERR;
-    }
-    GNUNET_OS_process_destroy (dbreset_proc);
   }
+
   if (GNUNET_OK !=
       TALER_BANK_auth_parse_cfg (cfg,
                                  config_section,
@@ -744,7 +709,7 @@ TALER_TESTING_prepare_fakebank (const char *config_filename,
               bc->exchange_payto);
   GNUNET_log (GNUNET_ERROR_TYPE_INFO, "user42_payto: %s\n",
               bc->user42_payto);
-  GNUNET_log (GNUNET_ERROR_TYPE_INFO, "user42_payto: %s\n",
+  GNUNET_log (GNUNET_ERROR_TYPE_INFO, "user43_payto: %s\n",
               bc->user43_payto);
   return GNUNET_OK;
 }

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