commit f2aa2ccd0cf5b97b09c46a937fbae3f2a8aa0811
parent 16cce04e4dd34c041d842a1a84d2a56c2bf75988
Author: Christian Grothoff <christian@grothoff.org>
Date: Sun, 2 Feb 2025 15:48:10 +0100
remove dependency on bc
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/testing/test_merchant_order_creation.sh b/src/testing/test_merchant_order_creation.sh
@@ -251,7 +251,7 @@ echo "OK"
echo -n "Creating discount token family..."
VALID_AFTER="{\"t_s\": $(date +%s)}" # now
VALID_BEFORE="{\"t_s\": $(date +%s -d "+30 days")}" # 30 days from now
-DURATION="{\"d_us\": $(echo '30 * 24 * 60 * 60 * 1000000' | bc)}" # 30 days
+DURATION="{\"d_us\": $(expr 30 \* 24 \* 60 \* 60 \* 1000000)}" # 30 days
STATUS=$(curl 'http://localhost:9966/private/tokenfamilies' \
-d "{\"kind\": \"discount\", \"slug\":\"test-discount\", \"name\": \"Test discount\", \"description\": \"Less money $$\", \"description_i18n\": {\"en\": \"Less money $$\", \"es\": \"Menos dinero $$\"}, \"valid_after\": $VALID_AFTER, \"valid_before\": $VALID_BEFORE, \"duration\": $DURATION, \"validity_granularity\": $DURATION}" \
-w "%{http_code}" -s -o /dev/null)