diff --git a/README.md b/README.md index 4392e06be58975df1bdfe2bacbb96e166c6d4ee9..809f15cff55ba141c2aff7d5428f547812766b72 100644 --- a/README.md +++ b/README.md @@ -64,9 +64,20 @@ The subdirectory examples shows how to use dubbo-go. Please read the [examples/R ## Running unit tests +### Prepare + +Mac/Linux ```bash sh ./before_ut.sh +``` + +Windows +```bash +before_ut.bat +``` +# Run +```bash go test ./... # coverage diff --git a/README_CN.md b/README_CN.md index 4bff9a86f0abb3799767153bca6efc6ca7a17257..85ff3821b4d869474db70ddc93a5356e5c024516 100644 --- a/README_CN.md +++ b/README_CN.md @@ -64,12 +64,23 @@ TODO ## 杩愯鍗曟祴 +### 鍑嗗 + +Mac/Linux ```bash sh ./before_ut.sh +``` + +Windows +```bash +before_ut.bat +``` +# 鎵ц +```bash go test ./... -# 瑕嗙洊鐜� +# coverage go test ./... -coverprofile=coverage.txt -covermode=atomic ``` diff --git a/before_ut.bat b/before_ut.bat new file mode 100644 index 0000000000000000000000000000000000000000..a10df71a7eeb2eadb9d86574dc374b14a4f74e05 --- /dev/null +++ b/before_ut.bat @@ -0,0 +1,5 @@ +set zkJar=zookeeper-3.4.9-fatjar.jar +md remoting\zookeeper\zookeeper-4unittest\contrib\fatjar config_center\zookeeper\zookeeper-4unittest\contrib\fatjar registry\zookeeper\zookeeper-4unittest\contrib\fatjar +curl -L https://github.com/dubbogo/resources/raw/master/zookeeper-4unitest/contrib/fatjar/%zkJar% -o remoting/zookeeper/zookeeper-4unittest/contrib/fatjar/%zkJar% +xcopy /f "remoting/zookeeper/zookeeper-4unittest/contrib/fatjar/%zkJar%" "config_center/zookeeper/zookeeper-4unittest/contrib/fatjar/" +xcopy /f "remoting/zookeeper/zookeeper-4unittest/contrib/fatjar/%zkJar%" "registry/zookeeper/zookeeper-4unittest/contrib/fatjar/" \ No newline at end of file