]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/run-frontend-unittests.sh
import quincy beta 17.1.0
[ceph.git] / ceph / src / pybind / mgr / dashboard / run-frontend-unittests.sh
index 2cfb81fb5182b20b6673d211e8f3047236763abb..997b86bbf679b8a629810ae63a6cea758e1b7f5d 100755 (executable)
@@ -7,7 +7,7 @@ SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
 cd $CEPH_ROOT/src/pybind/mgr/dashboard/frontend
 [ -z "$BUILD_DIR" ] && BUILD_DIR=build
 if [ `uname` != "FreeBSD" ]; then
-  .  $CEPH_ROOT/${BUILD_DIR}/src/pybind/mgr/dashboard/node-env/bin/activate
+  .  $CEPH_ROOT/${BUILD_DIR}/src/pybind/mgr/dashboard/frontend/node-env/bin/activate
 fi
 
 # Build
@@ -31,7 +31,9 @@ if [ $? -gt 0 ]; then
   echo -e "\nTranslations extraction has failed."
 else
   i18n_lint=`awk '/<source> |<source>$| <\/source>/,/<\/context-group>/ {printf "%-4s ", NR; print}' src/locale/messages.xlf`
-  if [ "$i18n_lint" ]; then
+
+  # Excluding the node_modules/ folder errors from the lint error
+  if [[ -n "$i18n_lint" &&  $i18n_lint != *"node_modules/"* ]]; then
     echo -e "\nThe following source translations in 'messages.xlf' need to be \
   fixed, please check the I18N suggestions on https://docs.ceph.com/en/latest/dev/developer_guide/dash-devel/#i18n:\n"
     echo "${i18n_lint}"
@@ -39,14 +41,6 @@ else
   fi
 fi
 
-# npm resolutions
-npm run fix:audit
-resolutions=`git status | grep package-lock.json`
-if [ "$resolutions" ]; then
-  echo "Please run 'npm run fix:audit' before committing."
-  failed=true
-fi
-
 if [ `uname` != "FreeBSD" ]; then
   deactivate
 fi