[load testing] remove extra loop and pass simulations to running script (#106997)

* [load testing] remove loop and pass simulations seq

* pass string, not array to script

* pass var via export

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Dzmitry Lemechko 2021-07-29 10:08:48 +02:00 committed by GitHub
parent 5067662ab9
commit e994d14eaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,8 +8,6 @@ do
done
echo "Simulation classes: $simulations";
IFS=',' read -ra sim_array <<< "${simulations}"
cd "$KIBANA_DIR"
source src/dev/ci_setup/setup_env.sh
@ -82,14 +80,11 @@ nohup ./metricbeat > metricbeat.log 2>&1 &
popd
echo " -> Running gatling load testing"
for i in "${sim_array[@]}"; do
sleep 30
echo "Running simulation $i .."
export GATLING_SIMULATIONS="$i"
node scripts/functional_tests \
--kibana-install-dir "$KIBANA_INSTALL_DIR" \
--config test/load/config.ts || exit 0;
done
export GATLING_SIMULATIONS="$simulations"
node scripts/functional_tests \
--kibana-install-dir "$KIBANA_INSTALL_DIR" \
--config test/load/config.ts;
echo " -> Simulations run is finished"