From 6e3197d2710de656cda8dcd9a92175fd083d0b9d Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 11 Nov 2024 21:11:16 +0100 Subject: fix test: init auditor and exchange DB before running test --- src/testing/test_auditor_api_version.c | 37 ++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/src/testing/test_auditor_api_version.c b/src/testing/test_auditor_api_version.c index dcd542ad8..83ef969a0 100644 --- a/src/testing/test_auditor_api_version.c +++ b/src/testing/test_auditor_api_version.c @@ -144,6 +144,38 @@ main (int argc, GNUNET_log_setup ("test-auditor-api-version", "INFO", NULL); + proc = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_ALL, + NULL, NULL, NULL, + "taler-auditor-dbinit", + "taler-auditor-dbinit", + "-c", CONFIG_FILE, + "-L", "INFO", + NULL); + if (NULL == proc) + { + GNUNET_log ( + GNUNET_ERROR_TYPE_ERROR, + "Failed to run `taler-auditor-dbinit`, is your PATH correct?\n"); + return 77; + } + GNUNET_OS_process_wait (proc); + GNUNET_OS_process_destroy (proc); + proc = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_ALL, + NULL, NULL, NULL, + "taler-exchange-dbinit", + "taler-exchange-dbinit", + "-c", CONFIG_FILE, + "-L", "INFO", + NULL); + if (NULL == proc) + { + GNUNET_log ( + GNUNET_ERROR_TYPE_ERROR, + "Failed to run `taler-auditor-dbinit`, is your PATH correct?\n"); + return 77; + } + GNUNET_OS_process_wait (proc); + GNUNET_OS_process_destroy (proc); proc = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_ALL, NULL, NULL, NULL, "taler-auditor-httpd", @@ -153,8 +185,9 @@ main (int argc, NULL); if (NULL == proc) { - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Failed to run `taler-auditor-httpd`, is your PATH correct?\n"); + GNUNET_log ( + GNUNET_ERROR_TYPE_ERROR, + "Failed to run `taler-auditor-httpd`, is your PATH correct?\n"); return 77; } global_ret = TALER_TESTING_wait_httpd_ready ("http://localhost:8083/"); -- cgit v1.2.3