merchant

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

commit 00d9973f0cef81425d28d95dc23731424b37fc63
parent 8d8bd0f085fd2e8385dbfaad498b1fdd920f35df
Author: Christian Grothoff <christian@grothoff.org>
Date:   Thu, 30 Oct 2025 20:50:45 +0100

-fix assertion

Diffstat:
Msrc/backend/taler-merchant-httpd_private-get-orders.c | 2+-
Msrc/backend/taler-merchant-httpd_private-get-products.c | 2+-
Msrc/testing/test_merchant_product_creation.sh | 14++++++++++++++
3 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_private-get-orders.c b/src/backend/taler-merchant-httpd_private-get-orders.c @@ -718,7 +718,7 @@ tr (const char *input) out[wpos++] = c; } out[wpos++] = '%'; - GNUNET_assert (wpos < slen); + GNUNET_assert (wpos < slen * 2 + 3); return out; } diff --git a/src/backend/taler-merchant-httpd_private-get-products.c b/src/backend/taler-merchant-httpd_private-get-products.c @@ -78,7 +78,7 @@ tr (const char *input) out[wpos++] = c; } out[wpos++] = '%'; - GNUNET_assert (wpos < slen); + GNUNET_assert (wpos < slen * 2 + 3); return out; } diff --git a/src/testing/test_merchant_product_creation.sh b/src/testing/test_merchant_product_creation.sh @@ -297,4 +297,18 @@ then fi echo " OK" +bash + +echo -n "Requesting inventory..." +STATUS=$(curl 'http://localhost:9966/private/products' \ + -w "%{http_code}" -s -o "$LAST_RESPONSE") + +if [ "$STATUS" != "200" ] +then + cat "$LAST_RESPONSE" + exit_fail "Expected 200. got: $STATUS" +fi + +cat "$LAST_RESPONSE" + exit 0