Skip to content

Commit

Permalink
Allow ftrepo to accept custom browser path running integTest (opensea…
Browse files Browse the repository at this point in the history
…rch-project#678) (opensearch-project#680)

Signed-off-by: Peter Zhu <[email protected]>
(cherry picked from commit ddabc9e)

Co-authored-by: Peter Zhu <[email protected]>
Signed-off-by: [email protected] <[email protected]>
  • Loading branch information
2 people authored and leanneeliatra committed Sep 15, 2023
1 parent c63f874 commit 4c37ef4
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions integtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,20 @@ then
PASSWORD=`echo $CREDENTIAL | awk -F ':' '{print $2}'`
fi

# User can send custom browser path through env variable
if [ -z "$BROWSER_PATH" ]
then
BROWSER_PATH="chromium"
fi

. ./test_finder.sh

npm install

TEST_FILES=`get_test_list $TEST_COMPONENTS`
echo -e "Test Files List:"
echo $TEST_FILES | tr ',' '\n'
echo "BROWSER_PATH: $BROWSER_PATH"

## WARNING: THIS LOGIC NEEDS TO BE THE LAST IN THIS FILE! ##
# Cypress returns back the test failure count in the error code
Expand All @@ -102,8 +109,8 @@ echo $TEST_FILES | tr ',' '\n'
if [ $SECURITY_ENABLED = "true" ]
then
echo "run security enabled tests"
yarn cypress:run-with-security --browser chromium --spec "$TEST_FILES"
yarn cypress:run-with-security --browser "$BROWSER_PATH" --spec "$TEST_FILES"
else
echo "run security disabled tests"
yarn cypress:run-without-security --browser chromium --spec "$TEST_FILES"
yarn cypress:run-without-security --browser "$BROWSER_PATH" --spec "$TEST_FILES"
fi

0 comments on commit 4c37ef4

Please sign in to comment.