merchant

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

commit 0ea0684f80f1dbbb9c4eadef03cd3af01412ccdd
parent 22ca9c89152aff6272418fa9726072787aa963cc
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sat,  6 May 2023 18:57:52 +0200

-fix transfer tracking test

Diffstat:
Msrc/testing/test_merchant_transfer_tracking.sh | 19+++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/src/testing/test_merchant_transfer_tracking.sh b/src/testing/test_merchant_transfer_tracking.sh @@ -194,10 +194,10 @@ STATUS=$(curl 'http://localhost:9966/instances/default/private/transfers' \ -m 3 \ -w "%{http_code}" -s -o $LAST_RESPONSE) -if [ "$STATUS" != "200" ] +if [ "$STATUS" != "204" ] then jq . < $LAST_RESPONSE - exit_fail "Expected response ok, after providing transfer data. got: $STATUS" + exit_fail "Expected response 204 no content, after providing transfer data. Got: $STATUS" fi echo " OK" @@ -223,6 +223,10 @@ fi echo "OK" +echo -n "Fetching running taler-merchant-exchange on bogus transfer ..." +taler-merchant-exchange -c $CONF -L INFO -t &> taler-merchant-exchange-bad.log +echo "OK" + echo -n "Fetching wire transfers of 'test' instance ..." STATUS=$(curl 'http://localhost:9966/instances/test/private/transfers' \ @@ -239,12 +243,11 @@ TRANSFERS_LIST_SIZE=`jq -r '.transfers | length' < $LAST_RESPONSE` if [ "$TRANSFERS_LIST_SIZE" != "0" ] then jq . < $LAST_RESPONSE - exit_fail "Expected response ok. got: $STATUS" + exit_fail "Expected non-empty transfer list size. got: $TRANSFERS_LIST_SIZE" fi echo "OK" - echo -n "Checking order status ..." STATUS=$(curl "http://localhost:9966/instances/test/private/orders/${ORDER_ID}?transfer=YES" \ -w "%{http_code}" -s -o $LAST_RESPONSE) @@ -275,13 +278,17 @@ STATUS=$(curl 'http://localhost:9966/instances/test/private/transfers' \ -m 3 \ -w "%{http_code}" -s -o $LAST_RESPONSE) -if [ "$STATUS" != "200" ] +if [ "$STATUS" != "204" ] then jq . < $LAST_RESPONSE - exit_fail "Expected response ok, after providing transfer data. got: $STATUS" + exit_fail "Expected response 204 no content, after providing transfer data. got: $STATUS" fi echo " OK" +echo -n "Fetching running taler-merchant-exchange on good transfer ..." +taler-merchant-exchange -c $CONF -L INFO -t &> taler-merchant-exchange-bad.log +echo "OK" + echo -n "Fetching wire transfers of TEST instance ..." STATUS=$(curl 'http://localhost:9966/instances/test/private/transfers' \