Skip to content

Commit

Permalink
Fix for nightly E2E on Power and Z
Browse files Browse the repository at this point in the history
Recent test image updates appear to have included a docker update
that's now stricter on volume config passed to `docker run`.

Previously the empty mount was ignored but is now blocking the tests.

Ensure that when video is disabled, we don't attempt to mount the volume.
  • Loading branch information
AlanGreene authored and tekton-robot committed Jul 26, 2023
1 parent f47b2ab commit 1115eda
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,11 @@ test_dashboard() {
echo "Running browser E2E tests…"

VIDEO_PATH=""
VIDEO_VOLUME=""
CYPRESS_ENV=""
if [ ! -z "$ARTIFACTS" ] && [ "$E2E_VIDEO" != "false" ]; then
VIDEO_PATH=$ARTIFACTS/videos
VIDEO_VOLUME="-v $VIDEO_PATH:/home/node/cypress/videos"
mkdir -p $VIDEO_PATH
chmod -R 777 $VIDEO_PATH
echo "Videos of failing tests will be stored at $VIDEO_PATH"
Expand All @@ -98,7 +100,7 @@ test_dashboard() {
CYPRESS_SPEC='-- --spec cypress/e2e/common/**/*'
fi
chmod 644 ~/.kube/config
docker run --rm --network=host $CYPRESS_ENV -v ~/.kube/config:/home/node/.kube/config -v $VIDEO_PATH:/home/node/cypress/videos dashboard-e2e $CYPRESS_SPEC || fail_test "Browser E2E tests failed"
docker run --rm --network=host $CYPRESS_ENV -v ~/.kube/config:/home/node/.kube/config $VIDEO_VOLUME dashboard-e2e $CYPRESS_SPEC || fail_test "Browser E2E tests failed"
# If we get here the tests passed, no need to upload artifacts
if [ ! -z "$VIDEO_PATH" ]; then
rm -rf $VIDEO_PATH
Expand Down

0 comments on commit 1115eda

Please sign in to comment.