Skip to content

Commit

Permalink
Provide default value for ARTIFACTS variable if missing
Browse files Browse the repository at this point in the history
This is required to prevent test script from failing if there's no
available location to write the videos captured during the browser e2e tests.
  • Loading branch information
AlanGreene committed Sep 19, 2022
1 parent ebfcea1 commit 248377f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ source $(dirname $0)/e2e-common.sh

# Script entry point.

ARTIFACTS="${ARTIFACTS:-`mktemp -d`}"
SED="sed"
START=1
END=30
Expand Down Expand Up @@ -166,6 +167,7 @@ test_dashboard() {
VIDEO_PATH=$ARTIFACTS/videos
mkdir -p $VIDEO_PATH
chmod -R 777 $VIDEO_PATH
echo "Videos of failing tests will be stored at $VIDEO_PATH"
# In case of failure we'll upload videos of the failing tests
# Our Cypress config will delete videos of passing tests before exiting
docker run --rm --network=host -v $VIDEO_PATH:/home/node/cypress/videos dashboard-e2e || fail_test "Browser E2E tests failed"
Expand Down

0 comments on commit 248377f

Please sign in to comment.