Skip to content

Commit 54b7331

Browse files
committed
ci: check that load tests went fine
1 parent 4c97207 commit 54b7331

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

scripts/ci_cd_test_load.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,17 @@ mkdir -p reports
3737
echo "Running load tests..."
3838
LOG_LEVEL=error npx artillery run gateway_load_tests.yml --output reports/gateway_load_tests.json
3939

40+
echo "Results:"
41+
cat reports/gateway_load_tests.json
42+
43+
# Check that no users have failed
44+
echo "Checking that no users have failed..."
45+
failed=$(jq '.aggregate.counters."vusers.failed"' reports/gateway_load_tests.json)
46+
if [ "$failed" != 0 ]; then
47+
echo "ERROR: Load test failed with $failed users failing."
48+
exit 1
49+
fi
50+
4051
echo "Stopping gateway..."
4152
kill $gateway_pid
4253

0 commit comments

Comments
 (0)