From 91ebda2e80d403733a7d19cbba6936512b2d3897 Mon Sep 17 00:00:00 2001 From: LaurenceLiZhixin <382673304@qq.com> Date: Sun, 26 Sep 2021 20:23:11 +0800 Subject: [PATCH] fix: integrate test script --- integrate_test.sh | 36 ++++++------------------------------ 1 file changed, 6 insertions(+), 30 deletions(-) diff --git a/integrate_test.sh b/integrate_test.sh index b12c653fd8..e2684ffdf0 100644 --- a/integrate_test.sh +++ b/integrate_test.sh @@ -35,35 +35,11 @@ echo "github pull request repo param -> $1" echo "github pull request base branch -> $3" echo "github pull request head branch -> ${GITHUB_HEAD_REF}" -samples_testing() { - echo "use dubbo-go-samples $3 branch for integration testing" - git clone -b master https://github.com/apache/dubbo-go-samples.git samples && cd samples +echo "use dubbo-go-samples $3 branch for integration testing" +git clone -b master https://github.com/apache/dubbo-go-samples.git samples && cd samples - # update dubbo-go to current commit id - go mod edit -replace=dubbo.apache.org/dubbo-go/v3=github.com/"$1"/v3@"$2" +# update dubbo-go to current commit id +go mod edit -replace=dubbo.apache.org/dubbo-go/v3=github.com/"$1"/v3@"$2" - # start integrate test - ./start_integrate_test.sh -} - -local_testing() { - echo "use test/integrate/dubbo for integration testing" - # default use zk as registry - #start zookeeper registry insecure listen in [:]:2181 - docker run -d --network host zookeeper - echo "zookeeper listen in [:]2181" - - # build go-server image - cd ./test/integrate/dubbo/go-server - docker build . -t ci-provider --build-arg REPO="$1" --build-arg COMMITID="$2" - cd "${ROOT_DIR}" - docker run -d --network host ci-provider -} - -# check dubbo-go-samples corresponding branch -res=$(git ls-remote --heads https://github.com/apache/dubbo-go-samples.git "$3" | wc -l) -if [ "$res" -eq "1" ]; then - samples_testing "$@" -else - local_testing "$@" -fi +# start integrate test +./start_integrate_test.sh