Skip to content

Commit

Permalink
fix(integ): Ignore unbound RUN_TESTS_IN_PARALLEL variable (#326)
Browse files Browse the repository at this point in the history
  • Loading branch information
kozlove-aws committed Feb 26, 2021
1 parent e1bfc79 commit 76edf55
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
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

0 comments on commit 76edf55

Please sign in to comment.