Skip to content

Commit 3b600d6

Browse files
authored
Merge pull request ceph#66143 from rhcs-dashboard/debug-e2e-error
mgr/dashboard: start node virtual-env after starting ceph cluster Reviewed-by: Afreen Misbah <[email protected]> Reviewed-by: Aashish Sharma <[email protected]>
2 parents 9e12916 + a56ae5b commit 3b600d6

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/pybind/mgr/dashboard/run-frontend-e2e-tests.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,6 @@ check_device_available() {
7979
if [ "$DEVICE" == "docker" ]; then
8080
[ -x "$(command -v docker)" ] || failed=true
8181
else
82-
cd $DASH_DIR/frontend
83-
npx cypress verify
84-
8582
case "$DEVICE" in
8683
chrome)
8784
[ -x "$(command -v chrome)" ] || [ -x "$(command -v google-chrome)" ] ||
@@ -124,19 +121,22 @@ DASH_DIR=`pwd`
124121
cd ../../../../${BUILD_DIR}
125122
FULL_PATH_BUILD_DIR=`pwd`
126123

127-
[[ "$(command -v npm)" == '' ]] && . ${FULL_PATH_BUILD_DIR}/src/pybind/mgr/dashboard/frontend/node-env/bin/activate
128-
129-
: ${CYPRESS_CACHE_FOLDER:="${FULL_PATH_BUILD_DIR}/src/pybind/mgr/dashboard/cypress"}
130-
131-
export CYPRESS_BASE_URL CYPRESS_CACHE_FOLDER CYPRESS_LOGIN_USER CYPRESS_LOGIN_PWD NO_COLOR CYPRESS_CEPH2_URL
132-
133124
check_device_available
134125

135126
if [ "$CYPRESS_BASE_URL" == "" ]; then
136127
start_ceph
137128
fi
138129

130+
# node-env is used for all frontend related actions like npm, npx etc.
131+
[[ "$(command -v npm)" == '' ]] && . ${FULL_PATH_BUILD_DIR}/src/pybind/mgr/dashboard/frontend/node-env/bin/activate
132+
133+
: ${CYPRESS_CACHE_FOLDER:="${FULL_PATH_BUILD_DIR}/src/pybind/mgr/dashboard/cypress"}
134+
135+
export CYPRESS_BASE_URL CYPRESS_CACHE_FOLDER CYPRESS_LOGIN_USER CYPRESS_LOGIN_PWD NO_COLOR CYPRESS_CEPH2_URL
136+
137+
# Verify Cypress installation
139138
cd $DASH_DIR/frontend
139+
npx cypress verify
140140

141141
# Remove existing XML results
142142
rm -f cypress/reports/results-*.xml || true

0 commit comments

Comments
 (0)