Skip to content

Commit a56ae5b

Browse files
committed
mgr/dashboard: start node virtual-env after starting ceph cluster
in frontend e2e.sh file, we don't need to start the node venv early on before the ceph cluster is started. we only need it for the `npm` or `npx` commands. Starting node virtual env and then starting ceph will cause the ceph cluster to assume the node-env python as the python environment which breaks the cryptotools call. So moving the node-env venv start after the ceph is created Fixes: https://tracker.ceph.com/issues/73804 Signed-off-by: Nizamudeen A <[email protected]>
1 parent 7cc2a30 commit a56ae5b

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)