[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: libeufin-based bank API test
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: libeufin-based bank API test |
Date: |
Fri, 13 Jan 2023 23:02:54 +0100 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new 50a33389 libeufin-based bank API test
50a33389 is described below
commit 50a33389dabe9660b08fc3fac616a580c9594e20
Author: MS <ms@taler.net>
AuthorDate: Fri Jan 13 22:59:22 2023 +0100
libeufin-based bank API test
Give Nexus and Sandbox one database each,
in order to reduce concurrent accesses to
the sqlite3 file.
---
src/testing/test_bank_api.c | 8 ++++----
src/testing/testing_api_helpers_bank.c | 27 +++++++++++++++++----------
2 files changed, 21 insertions(+), 14 deletions(-)
diff --git a/src/testing/test_bank_api.c b/src/testing/test_bank_api.c
index 8f559be8..8cd1ca31 100644
--- a/src/testing/test_bank_api.c
+++ b/src/testing/test_bank_api.c
@@ -207,10 +207,10 @@ main (int argc,
with_libeufin = GNUNET_YES;
cfgfile = CONFIG_FILE_NEXUS;
if (GNUNET_OK !=
- TALER_TESTING_prepare_nexus (CONFIG_FILE_NEXUS,
- GNUNET_YES,
- "exchange-account-2",
- &bc))
+ TALER_TESTING_prepare_libeufin (CONFIG_FILE_NEXUS,
+ GNUNET_YES,
+ "exchange-account-2",
+ &bc))
{
GNUNET_break (0);
return 77;
diff --git a/src/testing/testing_api_helpers_bank.c
b/src/testing/testing_api_helpers_bank.c
index df6d631e..b67c92ab 100644
--- a/src/testing/testing_api_helpers_bank.c
+++ b/src/testing/testing_api_helpers_bank.c
@@ -92,11 +92,10 @@ TALER_TESTING_run_libeufin (const struct
TALER_TESTING_BankConfiguration *bc)
struct TALER_TESTING_LibeufinServices ret = { 0 };
unsigned int iter;
char *curl_check_cmd;
- const char *db_conn = "jdbc:sqlite:/tmp/libeufin-exchange-test.sqlite3";
setenv (
"LIBEUFIN_NEXUS_DB_CONNECTION",
- db_conn,
+ "jdbc:sqlite:/tmp/libeufin-exchange-test-nexusdb.sqlite3",
1); // not overwriting any potentially existing DB.
nexus_proc = GNUNET_OS_start_process (
@@ -146,8 +145,8 @@ TALER_TESTING_run_libeufin (const struct
TALER_TESTING_BankConfiguration *bc)
fprintf (stderr, "\n");
setenv (
"LIBEUFIN_SANDBOX_DB_CONNECTION",
- db_conn,
- 1); // not overwriting existing any potentially existing DB.
+ "jdbc:sqlite:/tmp/libeufin-exchange-test-sandboxdb.sqlite3",
+ 1); // not overwriting any potentially existing DB.
setenv (
"LIBEUFIN_SANDBOX_ADMIN_PASSWORD",
"secret",
@@ -299,10 +298,10 @@ TALER_TESTING_run_bank (const char *config_filename,
enum GNUNET_GenericReturnValue
-TALER_TESTING_prepare_nexus (const char *config_filename,
- int reset_db,
- const char *config_section,
- struct TALER_TESTING_BankConfiguration *bc)
+TALER_TESTING_prepare_libeufin (const char *config_filename,
+ int reset_db,
+ const char *config_section,
+ struct TALER_TESTING_BankConfiguration *bc)
{
struct GNUNET_CONFIGURATION_Handle *cfg;
unsigned long long port;
@@ -367,10 +366,18 @@ TALER_TESTING_prepare_nexus (const char *config_filename,
/* DB preparation */
if (GNUNET_YES == reset_db)
{
- if (0 != system ("rm -f /tmp/libeufin-exchange-test.sqlite3"))
+ if (0 != system ("rm -f /tmp/libeufin-exchange-test-nexusdb.sqlite3"))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Failed to invoke db-removal command on nexusdb.\n");
+ GNUNET_free (database);
+ GNUNET_CONFIGURATION_destroy (cfg);
+ return GNUNET_SYSERR;
+ }
+ if (0 != system ("rm -f /tmp/libeufin-exchange-test-sandboxdb.sqlite3"))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Failed to invoke db-removal command.\n");
+ "Failed to invoke db-removal command on sandboxdb.\n");
GNUNET_free (database);
GNUNET_CONFIGURATION_destroy (cfg);
return GNUNET_SYSERR;
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-exchange] branch master updated: libeufin-based bank API test,
gnunet <=