Browse Source

Update code check in the pipeline

pull/2637/head
Kat 2 years ago
parent
commit
6ed9c48eb8
  1. 4
      .github/workflows/review_pipeline.yml
  2. 7
      lib/tasks/performance_test.sh

4
.github/workflows/review_pipeline.yml

@ -85,8 +85,8 @@ jobs:
aws ecs wait tasks-stopped --cluster $cluster --tasks $task_id
succeeded=$(aws ecs describe-tasks --cluster $cluster --tasks $task_id --query "tasks[0].containers[0].exitCode == '0'")
if [ "$succeeded" == "true" ]; then exit 0; else exit 1; fi
code=$(aws ecs describe-tasks --cluster $cluster --tasks $task_id --query "tasks[0].containers[0].exitCode")
if [ "$code == 0" ]; then exit 0; else exit 1; fi
comment:
name: Add link to PR

7
lib/tasks/performance_test.sh

@ -91,13 +91,6 @@ 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 -l -T application/x-www-form-urlencoded \
-H "X-CSRF-Token: $TOKEN" \
-C "$COOKIES" \

Loading…
Cancel
Save