From 867bd57e2dc5c1e11ece0e8b95dca2d444fa2f02 Mon Sep 17 00:00:00 2001 From: Saw-jan Date: Wed, 26 Feb 2025 15:47:48 +0545 Subject: [PATCH] test: fix env config value checks --- tests/acceptance/lint-expected-failures.sh | 6 +++--- tests/acceptance/run.sh | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/acceptance/lint-expected-failures.sh b/tests/acceptance/lint-expected-failures.sh index c17be505956..62dd3595a88 100755 --- a/tests/acceptance/lint-expected-failures.sh +++ b/tests/acceptance/lint-expected-failures.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash log_error() { - if [ -n "${PLAIN_OUTPUT}" ] + if [ -n "${PLAIN_OUTPUT}" ] && [ "${PLAIN_OUTPUT}" == "true" ] then echo -e "$1" else @@ -10,7 +10,7 @@ log_error() { } log_info() { - if [ -n "${PLAIN_OUTPUT}" ] + if [ -n "${PLAIN_OUTPUT}" ] && [ "${PLAIN_OUTPUT}" == "true" ] then echo -e "$1" else @@ -19,7 +19,7 @@ log_info() { } log_success() { - if [ -n "${PLAIN_OUTPUT}" ] + if [ -n "${PLAIN_OUTPUT}" ] && [ "${PLAIN_OUTPUT}" == "true" ] then echo -e "$1" else diff --git a/tests/acceptance/run.sh b/tests/acceptance/run.sh index aa73e2ae730..126ebc92771 100755 --- a/tests/acceptance/run.sh +++ b/tests/acceptance/run.sh @@ -17,17 +17,17 @@ else fi BEHAT_TAGS_OPTION_FOUND=false -if [ -n "${STEP_THROUGH}" ] +if [ -n "${STEP_THROUGH}" ] && [ "${STEP_THROUGH}" == "true" ] then STEP_THROUGH_OPTION="--step-through" fi -if [ -n "${STOP_ON_FAILURE}" ] +if [ -n "${STOP_ON_FAILURE}" ] && [ "${STOP_ON_FAILURE}" == "true" ] then STOP_OPTION="--stop-on-failure" fi -if [ -n "${PLAIN_OUTPUT}" ] +if [ -n "${PLAIN_OUTPUT}" ] && [ "${PLAIN_OUTPUT}" == "true" ] then # explicitly tell Behat to not do colored output COLORS_OPTION="--no-colors" @@ -670,6 +670,7 @@ fi # # If we are running in drone CI, then sleep for a bit to (hopefully) let the # # drone agent send all the output to the drone server. +# NOTE: Not using this anymore, please enable it if needed # if [ -n "${CI_REPO}" ] # then # echo "sleeping for 30 seconds at end of test run"