summaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-05-09 14:07:13 +0200
committerChristian Grothoff <christian@grothoff.org>2023-05-09 14:07:13 +0200
commitf009e0bd1261fe5b73ae7294faee3ac3e20ce802 (patch)
tree2f537fcbd8163628f2fd56a37715ccde87d1b5e5 /src/testing
parent85f6c8cdcce509d504e7dd8606beab2f45e7dab8 (diff)
downloadexchange-f009e0bd1261fe5b73ae7294faee3ac3e20ce802.tar.gz
exchange-f009e0bd1261fe5b73ae7294faee3ac3e20ce802.tar.bz2
exchange-f009e0bd1261fe5b73ae7294faee3ac3e20ce802.zip
-make content-length optional again
Diffstat (limited to 'src/testing')
-rw-r--r--src/testing/testing_api_helpers_bank.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/src/testing/testing_api_helpers_bank.c b/src/testing/testing_api_helpers_bank.c
index 2507a87e9..f2f92956d 100644
--- a/src/testing/testing_api_helpers_bank.c
+++ b/src/testing/testing_api_helpers_bank.c
@@ -30,6 +30,10 @@
#define BANK_FAIL() \
do {GNUNET_break (0); return NULL; } while (0)
+#define JDBC_TALERCHECK \
+ "jdbc:postgresql://localhost/talercheck?socketFactory=org.newsclub.net.unix." \
+ "AFUNIXSocketFactory$FactoryArg&socketFactoryArg" \
+ "=/var/run/postgresql/.s.PGSQL.5432"
struct TALER_FAKEBANK_Handle *
TALER_TESTING_run_fakebank (const char *bank_url,
@@ -95,7 +99,7 @@ TALER_TESTING_run_libeufin (const struct TALER_TESTING_BankConfiguration *bc)
setenv (
"LIBEUFIN_NEXUS_DB_CONNECTION",
- "jdbc:sqlite:/tmp/libeufin-exchange-test-nexusdb.sqlite3",
+ JDBC_TALERCHECK,
1); // not overwriting any potentially existing DB.
nexus_proc = GNUNET_OS_start_process (
@@ -145,7 +149,7 @@ TALER_TESTING_run_libeufin (const struct TALER_TESTING_BankConfiguration *bc)
fprintf (stderr, "\n");
setenv (
"LIBEUFIN_SANDBOX_DB_CONNECTION",
- "jdbc:sqlite:/tmp/libeufin-exchange-test-sandboxdb.sqlite3",
+ JDBC_TALERCHECK,
1); // not overwriting any potentially existing DB.
setenv (
"LIBEUFIN_SANDBOX_ADMIN_PASSWORD",
@@ -366,7 +370,12 @@ TALER_TESTING_prepare_libeufin (const char *config_filename,
/* DB preparation */
if (reset_db)
{
- if (0 != system ("rm -f /tmp/libeufin-exchange-test-nexusdb.sqlite3"))
+ setenv (
+ "LIBEUFIN_NEXUS_DB_CONNECTION",
+ JDBC_TALERCHECK,
+ 1); // not overwriting any potentially existing DB.
+
+ if (0 != system ("libeufin-nexus reset-tables"))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Failed to invoke db-removal command on nexusdb.\n");
@@ -374,7 +383,13 @@ TALER_TESTING_prepare_libeufin (const char *config_filename,
GNUNET_CONFIGURATION_destroy (cfg);
return GNUNET_SYSERR;
}
- if (0 != system ("rm -f /tmp/libeufin-exchange-test-sandboxdb.sqlite3"))
+
+ setenv (
+ "LIBEUFIN_SANDBOX_DB_CONNECTION",
+ JDBC_TALERCHECK,
+ 1); // not overwriting any potentially existing DB.
+
+ if (0 != system ("libeufin-sandbox reset-tables"))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Failed to invoke db-removal command on sandboxdb.\n");