diff options
-rwxr-xr-x | src/testing/test_merchant_kyc.sh | 14 | ||||
-rwxr-xr-x | src/testing/test_merchant_order_creation.sh | 18 |
2 files changed, 16 insertions, 16 deletions
diff --git a/src/testing/test_merchant_kyc.sh b/src/testing/test_merchant_kyc.sh index e7364af3..fabcef87 100755 --- a/src/testing/test_merchant_kyc.sh +++ b/src/testing/test_merchant_kyc.sh @@ -1,6 +1,6 @@ #!/bin/bash # This file is part of TALER -# Copyright (C) 2014-2021 Taler Systems SA +# Copyright (C) 2014-2023 Taler Systems SA # # TALER is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as @@ -63,7 +63,7 @@ STATUS=$(curl 'http://localhost:9966/instances/default/private/orders' \ if [ "$STATUS" != "200" ] then - echo 'should response ok, order created. got:' $STATUS `cat $LAST_RESPONSE` + echo 'should respond 200 OK, order created. got:' $STATUS `cat $LAST_RESPONSE` exit 1 fi @@ -76,7 +76,7 @@ then exit 1 fi -echo OK +echo "OK" echo -n "Checking created order without TOKEN..." @@ -87,13 +87,13 @@ PAY_URI=`jq -r .taler_pay_uri < $LAST_RESPONSE` if [ "$PAY_URI" == "null" ] then - echo 'should have a payuri. got:' $PAY_URI `cat $LAST_RESPONSE` + echo 'Expected a taler_pay_uri. Got:' $PAY_URI `cat $LAST_RESPONSE` exit 1 fi -echo OK +echo "OK" -echo -n "Getting information about kyc ..." +echo -n "Getting information about KYC ..." STATUS=$(curl -H "Content-Type: application/json" -X GET \ http://localhost:9966/instances/default/private/kyc \ @@ -101,7 +101,7 @@ STATUS=$(curl -H "Content-Type: application/json" -X GET \ if [ "$STATUS" != "204" ] then - echo 'should respond ok, instance created. got:' $STATUS + echo 'should respond 200 OK. got:' $STATUS exit 1 fi diff --git a/src/testing/test_merchant_order_creation.sh b/src/testing/test_merchant_order_creation.sh index 0c2188e0..b056d48d 100755 --- a/src/testing/test_merchant_order_creation.sh +++ b/src/testing/test_merchant_order_creation.sh @@ -51,7 +51,7 @@ STATUS=$(curl -H "Content-Type: application/json" -X POST \ if [ "$STATUS" != "204" ] then - echo 'should respond ok, instance created. got:' $STATUS + echo "Expected '204 No content' response. Got instead $STATUS" exit 1 fi @@ -65,11 +65,11 @@ STATUS=$(curl -H "Content-Type: application/json" -X PATCH \ if [ "$STATUS" != "204" ] then - echo 'should respond ok, instance updated. got:' $STATUS + echo "Expected '204 No content' response. Got instead: $STATUS" exit 1 fi +echo "OK" -echo OK RANDOM_IMG='data:image/png;base64,abcdefg' # @@ -196,7 +196,7 @@ then echo 'should get image but got something else. got:' $IMAGE exit 1 fi -echo OK +echo "OK" # @@ -213,7 +213,7 @@ then echo 'should respond ok, product created. got:' $STATUS exit 1 fi -echo OK +echo "OK" echo -n "Creating order with inventory products..." STATUS=$(curl 'http://localhost:9966/instances/default/private/orders' \ @@ -223,7 +223,7 @@ STATUS=$(curl 'http://localhost:9966/instances/default/private/orders' \ if [ "$STATUS" != "200" ] then - echo 'should response ok, order created. got:' $STATUS `cat $LAST_RESPONSE` + echo 'Expected 200 OK, order created response. Got:' $STATUS `cat $LAST_RESPONSE` exit 1 fi @@ -294,7 +294,7 @@ fi PAY_URL=`jq -e -r .taler_pay_uri < $LAST_RESPONSE` -echo OK +echo "OK" NOW=`date +%s` @@ -317,7 +317,7 @@ ORDER_STATUS=`jq -r .order_status < $LAST_RESPONSE` if [ "$ORDER_STATUS" != "paid" ] then - echo 'order should be paid. got:' $ORDER_STATUS `cat $LAST_RESPONSE` + echo "Order status should be 'paid'. got:" $ORDER_STATUS `cat $LAST_RESPONSE` exit 1 fi @@ -331,7 +331,7 @@ WIRE_DEADLINE=`jq -r .contract_terms.wire_transfer_deadline.t_s < $LAST_RESPONSE NOW=`date +%s` TO_SLEEP=`echo $(( $WIRE_DEADLINE - $NOW ))` -echo waiting $TO_SLEEP secs for wire transfer +echo "Waiting $TO_SLEEP secs for wire transfer" echo -n "Perform wire transfers ..." taler-exchange-aggregator -y -c $CONF -T ${TO_SLEEP}000000 -t -L INFO &> aggregator.log |