Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(integ): ignore unbound RUN_TESTS_IN_PARALLEL variable #326

Merged
merged 1 commit into from
Feb 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions integ/components/deadline/common/scripts/bash/deploy-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function deploy_component_stacks () {
echo "Running $COMPONENT_NAME end-to-end test..."

echo "Deploying test app for $COMPONENT_NAME test suite"
if [ "${RUN_TESTS_IN_PARALLEL}" = true ]; then
if [ "${RUN_TESTS_IN_PARALLEL-}" = true ]; then
npx cdk deploy "*" --require-approval=never > "$INTEG_TEMP_DIR/${COMPONENT_NAME}_deploy.txt" 2>&1
else
npx cdk deploy "*" --require-approval=never
Expand All @@ -36,7 +36,7 @@ function execute_component_test () {
run_aws_interaction_hook

echo "Running test suite $COMPONENT_NAME..."
if [ "${RUN_TESTS_IN_PARALLEL}" = true ]; then
if [ "${RUN_TESTS_IN_PARALLEL-}" = true ]; then
yarn run test "$COMPONENT_NAME.test" --json --outputFile="$INTEG_TEMP_DIR/$COMPONENT_NAME.json" > "$INTEG_TEMP_DIR/${COMPONENT_NAME}.txt" 2>&1
else
yarn run test "$COMPONENT_NAME.test" --json --outputFile="$INTEG_TEMP_DIR/$COMPONENT_NAME.json"
Expand All @@ -52,7 +52,7 @@ function destroy_component_stacks () {
run_aws_interaction_hook

echo "Destroying test app $COMPONENT_NAME..."
if [ "${RUN_TESTS_IN_PARALLEL}" = true ]; then
if [ "${RUN_TESTS_IN_PARALLEL-}" = true ]; then
npx cdk destroy "*" -f > "$INTEG_TEMP_DIR/${COMPONENT_NAME}_destroy.txt" 2>&1
else
npx cdk destroy "*" -f
Expand Down
4 changes: 2 additions & 2 deletions integ/scripts/bash/rfdk-integ-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ for COMPONENT in **/cdk.json; do
if [[ "$COMPONENT_NAME" != _* ]]; then
# Excecute the e2e test in the component's scripts directory
cd "$INTEG_ROOT/$COMPONENT_ROOT"
if [ "${RUN_TESTS_IN_PARALLEL}" = true ]; then
if [ "${RUN_TESTS_IN_PARALLEL-}" = true ]; then
(../common/scripts/bash/component_e2e.sh "$COMPONENT_NAME" || ../common/scripts/bash/component_e2e.sh "$COMPONENT_NAME" --destroy-only) &
export ${COMPONENT_NAME}_PID=$!
COMPONENTS+=(${COMPONENT_NAME})
Expand All @@ -104,7 +104,7 @@ for COMPONENT in **/cdk.json; do
export ${COMPONENT_NAME}_FINISH_TIME=$SECONDS
done

if [ "${RUN_TESTS_IN_PARALLEL}" = true ]; then
if [ "${RUN_TESTS_IN_PARALLEL-}" = true ]; then
while [ "${#COMPONENTS[@]}" -ne 0 ]; do
ACTIVE_COMPONENTS=()
for COMPONENT_NAME in ${COMPONENTS[@]}; do
Expand Down