From 6ed9c48eb8bd8ff3cfa29aed60a37f2d83b97166 Mon Sep 17 00:00:00 2001 From: Kat Date: Mon, 16 Sep 2024 12:18:23 +0100 Subject: [PATCH] Update code check in the pipeline --- .github/workflows/review_pipeline.yml | 4 ++-- lib/tasks/performance_test.sh | 7 ------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/review_pipeline.yml b/.github/workflows/review_pipeline.yml index 1d12a08ce..894b261d0 100644 --- a/.github/workflows/review_pipeline.yml +++ b/.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 diff --git a/lib/tasks/performance_test.sh b/lib/tasks/performance_test.sh index 88127ab63..84897c45c 100644 --- a/lib/tasks/performance_test.sh +++ b/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" \