merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit edc43c410067887be7b67114969c5a7fe90ac582
parent f6f260361a74ee277f36280b41e0e700d3768d90
Author: Florian Dold <dold@taler.net>
Date:   Mon, 28 Sep 2026 21:34:43 +0200

merchantdb: initialize the database test on an empty schema

Use the administrative connection before creating the schema. Report
reset and creation errors as failures instead of skips, and allow 180
seconds for the complete database suite to finish.

Diffstat:
Msrc/backenddb/meson.build | 1+
Msrc/backenddb/test_merchantdb.c | 12+++++++-----
2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/backenddb/meson.build b/src/backenddb/meson.build @@ -277,6 +277,7 @@ test( workdir: meson.current_build_dir(), suite: ['backenddb', 'installcheck'], is_parallel: false, + timeout: 180, ) configure_file( diff --git a/src/backenddb/test_merchantdb.c b/src/backenddb/test_merchantdb.c @@ -11857,17 +11857,19 @@ run (void *cls) struct GNUNET_CONFIGURATION_Handle *cfg = cls; test_cfg = cfg; - if (NULL == (pg = TALER_MERCHANTDB_connect (cfg))) + /* The test initializes its own schema, which may not exist yet. */ + if (NULL == (pg = TALER_MERCHANTDB_connect_admin (cfg))) { result = 77; return; } /* Drop the tables to cleanup anything that might cause issues */ - (void) TALER_MERCHANTDB_drop_tables (pg); - if (GNUNET_OK != - TALER_MERCHANTDB_create_tables (pg)) + if ( (GNUNET_OK != TALER_MERCHANTDB_drop_tables (pg)) || + (GNUNET_OK != TALER_MERCHANTDB_create_tables (pg)) ) { - result = 77; + TALER_MERCHANTDB_disconnect (pg); + pg = NULL; + result = 1; return; } /* Run the preflight */