Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ftr: Adding integration tests using dubbo-go-samples #1223

Merged
merged 3 commits into from
Jun 2, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 7 additions & 29 deletions integrate_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,34 +33,12 @@ echo "travis pull request repo slug -> ${GITHUB_REPOSITORY}"
echo "travis pull request actor -> ${GITHUB_ACTOR}"
echo "travis pull request repo param -> $1"

# clone dubbo-go-samples
git clone -b 3.0 https://github.com/apache/dubbo-go-samples.git samples
cd samples

# #start etcd registry insecure listen in [:]:2379
# docker run -d --network host k8s.gcr.io/etcd:3.3.10 etcd
# echo "etcdv3 listen in [:]2379"
# update dubbo-go to current commit id
go mod edit -replace=dubbo.apache.org/dubbo-go/v3=github.com/"$1"/v3@"$2"

# #start consul registry insecure listen in [:]:8500
# docker run -d --network host consul
# echo "consul listen in [:]8500"

# #start nacos registry insecure listen in [:]:8848
# docker run -d --network host nacos/nacos-server:latest
# echo "ncacos listen in [:]8848"

# 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

# build go-client image
cd ./test/integrate/dubbo/go-client
docker build . -t ci-consumer --build-arg REPO=$1 --build-arg COMMITID=$2
cd ${ROOT_DIR}
# run provider
# check consumer status
docker run -i --network host ci-consumer
# start integrate test
./start_integrate_test.sh