Skip to content

Commit

Permalink
Restore 'STOP_CONTAINERS' flag
Browse files Browse the repository at this point in the history
Reorder validation flag to run first
  • Loading branch information
manelcecs committed Mar 20, 2024
1 parent d422934 commit 4251af4
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions bin/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ KEEP=0
FORCE_STOP_JEST='--forceExit'
ONLY_CONTAINERS=0
COMMAND_ARGS=''
STOP_CONTAINERS=0

function moveToTestDir {
cd ${root}/tests
Expand Down Expand Up @@ -52,6 +53,12 @@ while [ "$1" != "" ]; do
shift
done

# ONLY_CONTAINERS must be 1 and STOP_CONTAINERS must be 0
if [ $ONLY_CONTAINERS -eq 1 ] && [ "$STOP_CONTAINERS" -eq 1 ]; then
echo "$USAGE"
exit 1
fi

# STOP_CONTAINERS is a final option
if [[ $STOP_CONTAINERS -eq 1 ]]; then
echo "Stopping Docker containers"
Expand All @@ -60,12 +67,6 @@ if [[ $STOP_CONTAINERS -eq 1 ]]; then
exit 0
fi

# ONLY_CONTAINERS must be 1 and STOP must be 0
if [ $ONLY_CONTAINERS -eq 1 ] && [ "$STOP" -eq 1 ]; then
echo "Invalid options - when using option -oc, option -ns must be used as well"
echo "$USAGE"
exit 1
fi

echo "Starting Docker containers"
moveToTestDir
Expand Down

0 comments on commit 4251af4

Please sign in to comment.