From 051fabf5bb6ab47f9df0c414e4a295d0d0cc43c9 Mon Sep 17 00:00:00 2001 From: jos3duardo Date: Sun, 10 Aug 2025 00:55:12 -0400 Subject: [PATCH] Add test-payments.sh script for simulating payment requests --- test-payments.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 test-payments.sh diff --git a/test-payments.sh b/test-payments.sh new file mode 100755 index 0000000..95cc6c9 --- /dev/null +++ b/test-payments.sh @@ -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 \ No newline at end of file