test: fix env config value checks

This commit is contained in:
Saw-jan
2025-02-26 15:47:48 +05:45
parent feda8552c4
commit 867bd57e2d
2 changed files with 7 additions and 6 deletions

View File

@@ -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

View File

@@ -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"