From 4f81553972b56ea3db9fb5380bfd74e24efacaca Mon Sep 17 00:00:00 2001 From: Kat Date: Mon, 16 Sep 2024 11:15:54 +0100 Subject: [PATCH] Do a test post with curl --- lib/tasks/performance_test.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/tasks/performance_test.sh b/lib/tasks/performance_test.sh index 402fd7ed4..14612e8f3 100644 --- a/lib/tasks/performance_test.sh +++ b/lib/tasks/performance_test.sh @@ -91,6 +91,13 @@ COOKIES=$(awk '/_data_collector_session/ { print $6, $7 }' login_cookies.txt | t echo "lettings_log[tenancycode]=performance_test_tenancy_code&lettings_log[page]=tenant_code&authenticity_token=$TOKEN" > post_data.txt +# do a test post +curl -b login_cookies.txt -X POST https://staging.submit-social-housing-data.levellingup.gov.uk$completed_log_link/tenant-code \ + -H "X-CSRF-Token: $TOKEN" \ + -d "lettings_log[tenancycode]=7" \ + -d "lettings_log[page]=tenant_code" \ + -d "authenticity_token=$TOKEN" + ab -n 50 -c 50 -T application/x-www-form-urlencoded \ -H "X-CSRF-Token: $TOKEN" \ -C "$COOKIES" \