You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2021/01/20 00:44:04 UTC

[GitHub] [servicecomb-service-center] tianxiaoliang commented on a change in pull request #834: open server/service ut

tianxiaoliang commented on a change in pull request #834:
URL: https://github.com/apache/servicecomb-service-center/pull/834#discussion_r560596698



##########
File path: scripts/ut.sh
##########
@@ -21,13 +21,27 @@ ROOT_PATH=$(dirname $CURRENT_PATH)
 
 export COVERAGE_PATH=$(pwd)
 cd $1
-for d in $(go list -f '{{.Dir}}' ./... | grep -v vendor| grep -v syncer); do
-    cd $d
-    if [ $(ls | grep _test.go | wc -l) -gt 0 ]; then
+
+run_test() {
+  cd $1
+  if [ $(ls | grep _test.go | wc -l) -gt 0 ]; then
         go test -cover -covermode atomic -coverprofile coverage.out
         if [ -f coverage.out ]; then
             sed '1d;$d' coverage.out >> $ROOT_PATH/coverage.txt
         fi
     fi
-done
+}
+
+test_mode=${TEST_MODE}

Review comment:
       环境变量统一改成SC_DATA_SOURCE=mongo 保证最终编译的二进制也支持这个环境变量




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org