summaryrefslogtreecommitdiff
path: root/src/testing/test_merchant_order_creation.sh
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-04-15 14:38:48 +0200
committerChristian Grothoff <christian@grothoff.org>2023-04-15 14:38:48 +0200
commit44bc6f8b5c5fb93dac3da96249d555237ec8b956 (patch)
tree07412c54f62b133ed3f211a2ff7d58db22b791f3 /src/testing/test_merchant_order_creation.sh
parent1ccb665a36d01465e6ed810b92f7646ac50e0880 (diff)
downloadmerchant-44bc6f8b5c5fb93dac3da96249d555237ec8b956.tar.gz
merchant-44bc6f8b5c5fb93dac3da96249d555237ec8b956.tar.bz2
merchant-44bc6f8b5c5fb93dac3da96249d555237ec8b956.zip
style fixes
Diffstat (limited to 'src/testing/test_merchant_order_creation.sh')
-rwxr-xr-xsrc/testing/test_merchant_order_creation.sh18
1 files changed, 9 insertions, 9 deletions
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