merchant

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

commit 6efab6eddad09ed8f209bc2f740c7c29ccc1058b
parent 0275aacac6835b2ee0b1b579e93963691ab9e8bd
Author: Özgür Kesim <oec-taler@kesim.org>
Date:   Tue, 23 Jan 2024 11:58:18 +0100

[ci] fixing CI testing, SERVE values set, more error message, WIP

Diffstat:
Mcontrib/ci/jobs/2-test/test.sh | 2+-
Msrc/testing/test.conf | 2+-
Msrc/testing/test_key_rotation.conf | 2+-
Msrc/testing/test_kyc_api.conf | 2+-
Msrc/testing/test_merchant_api.conf | 2+-
Msrc/testing/testing_api_cmd_delete_template.c | 7++++---
Msrc/testing/testing_api_cmd_forget_order.c | 7++++---
Msrc/testing/testing_api_cmd_post_instances.c | 9++++-----
Msrc/testing/testing_api_cmd_post_orders.c | 2++
Msrc/testing/testing_api_cmd_post_templates.c | 7++++---
10 files changed, 23 insertions(+), 19 deletions(-)

diff --git a/contrib/ci/jobs/2-test/test.sh b/contrib/ci/jobs/2-test/test.sh @@ -19,7 +19,7 @@ sudo -u postgres createdb -p 5432 -O root talercheck check_command() { # Set LD_LIBRARY_PATH so tests can find the installed libs - LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/taler:/usr/lib/taler PGPORT=5432 make check + LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/taler:/usr/lib:/usr/lib/taler PGPORT=5432 make check } print_logs() diff --git a/src/testing/test.conf b/src/testing/test.conf @@ -40,7 +40,7 @@ HTTP_PORT = 8082 # Which port do we run the backend on? (HTTP server) PORT = 8080 -SERVE = http +SERVE = tcp # Which plugin (backend) do we use for the DB. DB = postgres diff --git a/src/testing/test_key_rotation.conf b/src/testing/test_key_rotation.conf @@ -78,7 +78,7 @@ HTTP_PORT = 8082 SUGGESTED_EXCHANGE = http://localhost:8081/ SUGGESTED_EXCHANGE_PAYTO = payto://x-taler-bank/localhost/2 ALLOW_REGISTRATIONS = YES -SERVE = http +SERVE = tcp [exchangedb] IDLE_RESERVE_EXPIRATION_TIME = 4 weeks diff --git a/src/testing/test_kyc_api.conf b/src/testing/test_kyc_api.conf @@ -19,7 +19,7 @@ HTTP_PORT = 8082 [merchant] PORT = 8080 -SERVE = http +SERVE = tcp DB = postgres # This specifies which database the postgres backend uses. diff --git a/src/testing/test_merchant_api.conf b/src/testing/test_merchant_api.conf @@ -32,7 +32,7 @@ PORT = 8082 [merchant] PORT = 8080 -SERVE = http +SERVE = tcp DB = postgres [merchantdb-postgres] diff --git a/src/testing/testing_api_cmd_delete_template.c b/src/testing/testing_api_cmd_delete_template.c @@ -77,9 +77,10 @@ delete_template_cb (void *cls, dis->tdh = NULL; if (dis->http_status != hr->http_status) { - TALER_TESTING_unexpected_status (dis->is, - hr->http_status, - dis->http_status); + TALER_TESTING_unexpected_status_with_body (dis->is, + hr->http_status, + dis->http_status, + hr->reply); return; } switch (hr->http_status) diff --git a/src/testing/testing_api_cmd_forget_order.c b/src/testing/testing_api_cmd_forget_order.c @@ -121,9 +121,10 @@ order_forget_cb (void *cls, ofs->ofh = NULL; if (ofs->http_status != hr->http_status) { - TALER_TESTING_unexpected_status (ofs->is, - hr->http_status, - ofs->http_status); + TALER_TESTING_unexpected_status_with_body (ofs->is, + hr->http_status, + ofs->http_status, + hr->reply); return; } TALER_TESTING_interpreter_next (ofs->is); diff --git a/src/testing/testing_api_cmd_post_instances.c b/src/testing/testing_api_cmd_post_instances.c @@ -112,11 +112,10 @@ post_instances_cb (void *cls, pis->iph = NULL; if (pis->http_status != hr->http_status) { - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Unexpected response code %u (%d) to command %s\n", - hr->http_status, - (int) hr->ec, - TALER_TESTING_interpreter_get_current_label (pis->is)); + TALER_TESTING_unexpected_status_with_body (pis->is, + hr->http_status, + pis->http_status, + hr->reply); TALER_TESTING_interpreter_fail (pis->is); return; } diff --git a/src/testing/testing_api_cmd_post_orders.c b/src/testing/testing_api_cmd_post_orders.c @@ -264,6 +264,8 @@ order_cb (void *cls, por->hr.http_status, ps->http_status, por->hr.reply); + TALER_TESTING_interpreter_fail (ps->is); + return; } switch (por->hr.http_status) { diff --git a/src/testing/testing_api_cmd_post_templates.c b/src/testing/testing_api_cmd_post_templates.c @@ -92,9 +92,10 @@ post_templates_cb (void *cls, tis->iph = NULL; if (tis->http_status != hr->http_status) { - TALER_TESTING_unexpected_status (tis->is, - hr->http_status, - tis->http_status); + TALER_TESTING_unexpected_status_with_body (tis->is, + hr->http_status, + tis->http_status, + hr->reply); return; } switch (hr->http_status)