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/19 11:19:41 UTC

[GitHub] [servicecomb-service-center] xzccfzy opened a new pull request #834: open server/service ut

xzccfzy opened a new pull request #834:
URL: https://github.com/apache/servicecomb-service-center/pull/834


   - mongo 表添加project索引
   - 打开server/service ut,mongo部分的ut忽略broker


----------------------------------------------------------------
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



[GitHub] [servicecomb-service-center] xzccfzy closed pull request #834: open server/service ut

Posted by GitBox <gi...@apache.org>.
xzccfzy closed pull request #834:
URL: https://github.com/apache/servicecomb-service-center/pull/834


   


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
tianxiaoliang commented on pull request #834:
URL: https://github.com/apache/servicecomb-service-center/pull/834#issuecomment-763311109


   还有补充下文档 https://service-center.readthedocs.io/en/latest/user-guides.html 这下面补充个章节,讲述环境变量和命令行作用
   


----------------------------------------------------------------
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



[GitHub] [servicecomb-service-center] xzccfzy commented on pull request #834: open server/service ut

Posted by GitBox <gi...@apache.org>.
xzccfzy commented on pull request #834:
URL: https://github.com/apache/servicecomb-service-center/pull/834#issuecomment-764131481


   > 还有补充下文档 https://service-center.readthedocs.io/en/latest/user-guides.html 这下面补充个章节,讲述环境变量和命令行作用
   > 
   > 先讲述这个存储的参数
   
   ok ,我看看kie的相关代码


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
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



[GitHub] [servicecomb-service-center] tianxiaoliang edited a comment on pull request #834: open server/service ut

Posted by GitBox <gi...@apache.org>.
tianxiaoliang edited a comment on pull request #834:
URL: https://github.com/apache/servicecomb-service-center/pull/834#issuecomment-763311109


   还有补充下文档 https://service-center.readthedocs.io/en/latest/user-guides.html 这下面补充个章节,讲述环境变量和命令行作用
   
   先讲述这个存储的参数
   


----------------------------------------------------------------
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



[GitHub] [servicecomb-service-center] xzccfzy closed pull request #834: open server/service ut

Posted by GitBox <gi...@apache.org>.
xzccfzy closed pull request #834:
URL: https://github.com/apache/servicecomb-service-center/pull/834


   


----------------------------------------------------------------
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



[GitHub] [servicecomb-service-center] xzccfzy commented on pull request #834: open server/service ut

Posted by GitBox <gi...@apache.org>.
xzccfzy commented on pull request #834:
URL: https://github.com/apache/servicecomb-service-center/pull/834#issuecomment-764131481


   > 还有补充下文档 https://service-center.readthedocs.io/en/latest/user-guides.html 这下面补充个章节,讲述环境变量和命令行作用
   > 
   > 先讲述这个存储的参数
   
   ok ,我看看kie的相关代码


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
tianxiaoliang commented on a change in pull request #834:
URL: https://github.com/apache/servicecomb-service-center/pull/834#discussion_r560597131



##########
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:
       https://github.com/apache/servicecomb-kie/blob/da18ef3fbe4276a22b93d076a8646b7f1dbbff8a/server/command/command.go#L45
   
   参考这种写法二进制支持命令行+env,ut支持env




----------------------------------------------------------------
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