[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] branch master updated: -fix some tests
From: |
gnunet |
Subject: |
[taler-merchant] branch master updated: -fix some tests |
Date: |
Sun, 08 Dec 2024 22:39:34 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new d2e65f33 -fix some tests
d2e65f33 is described below
commit d2e65f33ac744786faddab9e01709b048c1f72c5
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sun Dec 8 22:39:32 2024 +0100
-fix some tests
---
src/backend/taler-merchant-httpd_private-post-orders.c | 10 +++++++---
src/testing/test_kyc_api.c | 1 +
src/testing/test_merchant_instance_auth.sh | 5 ++++-
src/testing/test_merchant_kyc.sh | 6 +++++-
src/testing/test_merchant_order_autocleanup.sh | 1 +
src/testing/test_merchant_order_creation.sh | 1 +
src/testing/test_merchant_order_refund.sh | 5 +++--
src/testing/test_merchant_product_creation.sh | 1 +
src/testing/test_merchant_transfer_tracking.sh | 1 +
src/testing/test_merchant_wirewatch.sh | 1 +
10 files changed, 25 insertions(+), 7 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_private-post-orders.c
b/src/backend/taler-merchant-httpd_private-post-orders.c
index af685cc2..99a240af 100644
--- a/src/backend/taler-merchant-httpd_private-post-orders.c
+++ b/src/backend/taler-merchant-httpd_private-post-orders.c
@@ -1520,20 +1520,24 @@ set_token_family (struct OrderContext *oc,
switch (iqs)
{
case GNUNET_DB_STATUS_HARD_ERROR:
+ GNUNET_break (0);
http_status = MHD_HTTP_INTERNAL_SERVER_ERROR;
ec = TALER_EC_GENERIC_DB_STORE_FAILED;
break;
case GNUNET_DB_STATUS_SOFT_ERROR:
- case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS:
+ GNUNET_break (0);
http_status = MHD_HTTP_INTERNAL_SERVER_ERROR;
ec = TALER_EC_GENERIC_DB_SOFT_FAILURE;
break;
+ case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS:
+ GNUNET_break (0);
+ http_status = MHD_HTTP_INTERNAL_SERVER_ERROR;
+ ec = TALER_EC_GENERIC_DB_STORE_FAILED;
+ break;
case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT:
/* case listed to make compilers happy */
GNUNET_assert (0);
}
-
- GNUNET_break (0);
reply_with_error (oc,
http_status,
ec,
diff --git a/src/testing/test_kyc_api.c b/src/testing/test_kyc_api.c
index 30553f19..1e73bd7e 100644
--- a/src/testing/test_kyc_api.c
+++ b/src/testing/test_kyc_api.c
@@ -502,6 +502,7 @@ run (void *cls,
CONFIG_FILE,
"-ema",
"-u", "exchange-account-exchange",
+ "-r", "merchant-exchange-test",
NULL),
TALER_TESTING_cmd_get_exchange (
"get-exchange",
diff --git a/src/testing/test_merchant_instance_auth.sh
b/src/testing/test_merchant_instance_auth.sh
index 1959628b..f0b6adf9 100755
--- a/src/testing/test_merchant_instance_auth.sh
+++ b/src/testing/test_merchant_instance_auth.sh
@@ -68,7 +68,10 @@ kill -TERM "$SETUP_PID"
wait
unset SETUP_PID
-setup -c test_template.conf -ef -u "exchange-account-2"
+setup -c test_template.conf \
+ -ef \
+ -u "exchange-account-2" \
+ -m "merchant-exchange-default"
NEW_SECRET=secret-token:different_value
diff --git a/src/testing/test_merchant_kyc.sh b/src/testing/test_merchant_kyc.sh
index 592978e3..9da3c87c 100755
--- a/src/testing/test_merchant_kyc.sh
+++ b/src/testing/test_merchant_kyc.sh
@@ -22,7 +22,11 @@ set -eu
# Launch system.
-setup -c "test_template.conf" -mef -u "exchange-account-2"
+setup \
+ -c "test_template.conf" \
+ -mef \
+ -r "merchant-exchange-default" \
+ -u "exchange-account-2"
LAST_RESPONSE=$(mktemp -p "${TMPDIR:-/tmp}" test_response.conf-XXXXXX)
echo -n "Configuring a merchant default instance ..."
diff --git a/src/testing/test_merchant_order_autocleanup.sh
b/src/testing/test_merchant_order_autocleanup.sh
index 3f792f12..ac053386 100755
--- a/src/testing/test_merchant_order_autocleanup.sh
+++ b/src/testing/test_merchant_order_autocleanup.sh
@@ -31,6 +31,7 @@ echo " FOUND"
# Launch exchange, merchant and bank.
setup -c "test_template.conf" \
+ -r "merchant-exchange-default" \
-em \
$BANK_FLAGS
LAST_RESPONSE=$(mktemp -p "${TMPDIR:-/tmp}" test_response.conf-XXXXXX)
diff --git a/src/testing/test_merchant_order_creation.sh
b/src/testing/test_merchant_order_creation.sh
index f0823a22..a566cb7d 100755
--- a/src/testing/test_merchant_order_creation.sh
+++ b/src/testing/test_merchant_order_creation.sh
@@ -34,6 +34,7 @@ echo " FOUND"
# Launch exchange, merchant and bank.
setup -c "test_template.conf" \
+ -r "merchant-exchange-default" \
-em \
$BANK_FLAGS
LAST_RESPONSE=$(mktemp -p "${TMPDIR:-/tmp}" test_response.conf-XXXXXX)
diff --git a/src/testing/test_merchant_order_refund.sh
b/src/testing/test_merchant_order_refund.sh
index af07d233..c0413eb6 100755
--- a/src/testing/test_merchant_order_refund.sh
+++ b/src/testing/test_merchant_order_refund.sh
@@ -36,6 +36,7 @@ echo " FOUND"
# Launch exchange, merchant and bank.
setup -c "test_template.conf" \
-em \
+ -r "merchant-exchange-default" \
$BANK_FLAGS
LAST_RESPONSE=$(mktemp -p "${TMPDIR:-/tmp}" test_response.conf-XXXXXX)
CONF="test_template.conf.edited"
@@ -192,7 +193,7 @@ echo Sending refund for TESTKUDOS:1
STATUS=$(curl "http://localhost:9966/private/orders/${ORDER_ID}/refund" \
-d '{"refund":"TESTKUDOS:1","reason":"duplicated"}' \
-w "%{http_code}" -s -o "$LAST_RESPONSE")
-
+
if [ "$STATUS" != "200" ]
then
jq . < "$LAST_RESPONSE"
@@ -214,7 +215,7 @@ echo Increasing refund for TESTKUDOS:3
STATUS=$(curl "http://localhost:9966/private/orders/${ORDER_ID}/refund" \
-d '{"refund":"TESTKUDOS:5","reason":"duplicated"}' \
-w "%{http_code}" -s -o "$LAST_RESPONSE")
-
+
if [ "$STATUS" != "200" ]
then
jq . < "$LAST_RESPONSE"
diff --git a/src/testing/test_merchant_product_creation.sh
b/src/testing/test_merchant_product_creation.sh
index e745774c..9534ec31 100755
--- a/src/testing/test_merchant_product_creation.sh
+++ b/src/testing/test_merchant_product_creation.sh
@@ -48,6 +48,7 @@ echo " FOUND"
# Launch system.
setup -c "test_template.conf" \
+ -r "merchant-exchange-default" \
-em \
$BANK_FLAGS
LAST_RESPONSE=$(mktemp -p "${TMPDIR:-/tmp}" test_response.conf-XXXXXX)
diff --git a/src/testing/test_merchant_transfer_tracking.sh
b/src/testing/test_merchant_transfer_tracking.sh
index 832489c9..e0b90a79 100755
--- a/src/testing/test_merchant_transfer_tracking.sh
+++ b/src/testing/test_merchant_transfer_tracking.sh
@@ -47,6 +47,7 @@ echo " FOUND"
# Launch system.
setup -c "test_template.conf" \
+ -r "merchant-exchange-default" \
-em \
$BANK_FLAGS
LAST_RESPONSE=$(mktemp -p "${TMPDIR:-/tmp}" test_response.conf-XXXXXX)
diff --git a/src/testing/test_merchant_wirewatch.sh
b/src/testing/test_merchant_wirewatch.sh
index b9cfd396..f230c2da 100755
--- a/src/testing/test_merchant_wirewatch.sh
+++ b/src/testing/test_merchant_wirewatch.sh
@@ -53,6 +53,7 @@ fi
# Launch exchange, merchant and bank.
setup -c "test_template.conf" \
-em \
+ -r "merchant-exchange-default" \
$BANK_FLAGS
LAST_RESPONSE=$(mktemp -p "${TMPDIR:-/tmp}" test_response.conf-XXXXXX)
CONF="test_template.conf.edited"
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-merchant] branch master updated: -fix some tests,
gnunet <=