Add test-payments.sh script for simulating payment requests

This commit is contained in:
Jose Eduardo 2025-08-10 00:55:12 -04:00
parent 439ce1bff3
commit 051fabf5bb

12
test-payments.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/sh
for i in $(seq 1 1000); do
amount=$(awk -v min=10 -v max=100 'BEGIN{srand(); printf "%.2f", min+rand()*(max-min)}')
correlationId=$(uuidgen)
curl --location 'http://192.168.1.126:9999/payments' \
--header 'Content-Type: application/json' \
--data "{
\"amount\": $amount,
\"correlationId\": \"$correlationId\"
}"
echo
done