Skip to content

Commit 0d415ce

Browse files
committed
Refactor for loop
1 parent ccd8154 commit 0d415ce

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

scripts/test-check-packages.sh

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -147,22 +147,26 @@ for d in test/packages/${PACKAGE_TEST_TYPE:-other}/${PACKAGE_UNDER_TEST:-*}/; do
147147
elif [ "${package_to_test}" == "system_benchmark" ]; then
148148
run_system_benchmark "${package_to_test}" "$d"
149149
fi
150-
elif [ "${PACKAGE_TEST_TYPE:-other}" == "with-logstash" ] && [ "${package_to_test}" == "system_benchmark" ]; then
151-
run_system_benchmark "${package_to_test}" "$d"
152-
else
153-
if [[ "${SERVERLESS}" == "true" ]]; then
154-
run_serverless_tests "${d}"
155-
continue
156-
fi
150+
continue
151+
fi
157152

158-
echo "--- Run tests for package ${d}"
159-
# Run all tests
160-
# defer-cleanup is set to a short period to verify that the option is available
161-
elastic-package test -C "$d" -v \
162-
--report-format xUnit \
163-
--report-output file \
164-
--defer-cleanup 1s \
165-
--test-coverage \
166-
--coverage-format=generic
153+
if [ "${PACKAGE_TEST_TYPE:-other}" == "with-logstash" ] && [ "${package_to_test}" == "system_benchmark" ]; then
154+
run_system_benchmark "${package_to_test}" "$d"
155+
continue
167156
fi
157+
158+
if [[ "${SERVERLESS}" == "true" ]]; then
159+
run_serverless_tests "${d}"
160+
continue
161+
fi
162+
163+
echo "--- Run tests for package ${d}"
164+
# Run all tests
165+
# defer-cleanup is set to a short period to verify that the option is available
166+
elastic-package test -C "$d" -v \
167+
--report-format xUnit \
168+
--report-output file \
169+
--defer-cleanup 1s \
170+
--test-coverage \
171+
--coverage-format=generic
168172
done

0 commit comments

Comments
 (0)