forked from etcd-io/etcd
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For etcd-io#8502. First step to make DNS/SRV tests easier to run. ``` make docker-dns-test-build make docker-dns-test-compile make docker-dns-test-run ``` Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
- Loading branch information
Showing
3 changed files
with
80 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
.PHONY: build | ||
build: | ||
GO_BUILD_FLAGS="-v" ./build | ||
./bin/etcd --version | ||
ETCDCTL_API=3 ./bin/etcdctl version | ||
|
||
test-all: | ||
RELEASE_TEST=y INTEGRATION=y PASSES='build unit release integration_e2e functional' ./test | ||
|
||
clean: | ||
rm -f ./docker-test.log | ||
rm -rf ./gopath | ||
# clean up failed tests | ||
rm -f ./integration/127.0.0.1:* ./integration/localhost:* | ||
rm -f ./clientv3/integration/127.0.0.1:* ./clientv3/integration/localhost:* | ||
rm -f ./clientv3/ordering/127.0.0.1:* ./clientv3/ordering/localhost:* | ||
|
||
docker-test-build: | ||
docker build --tag gcr.io/etcd-development/etcd-test:latest --file ./Dockerfile-test . | ||
|
||
# gcloud docker -- login -u _json_key -p "$(cat /etc/gcp-key-etcd.json)" https://gcr.io | ||
docker-test-push: | ||
gcloud docker -- push gcr.io/etcd-development/etcd-test:latest | ||
|
||
docker-test-pull: | ||
docker pull gcr.io/etcd-development/etcd-test:latest | ||
|
||
docker-test: | ||
docker run \ | ||
--rm \ | ||
--volume=`pwd`:/go/src/github.com/coreos/etcd \ | ||
gcr.io/etcd-development/etcd-test:latest \ | ||
/bin/bash -c "RELEASE_TEST=y INTEGRATION=y PASSES='build unit release integration_e2e functional' ./test 2>&1 | tee docker-test.log" | ||
|
||
docker-dns-test-build: | ||
docker build \ | ||
--tag gcr.io/etcd-development/etcd-dns-test:latest \ | ||
--file ./e2e/docker/Dockerfile \ | ||
./e2e/docker | ||
|
||
docker run \ | ||
--rm \ | ||
--dns 127.0.0.1 \ | ||
gcr.io/etcd-development/etcd-dns-test:latest \ | ||
/bin/bash -c "/etc/init.d/bind9 start && cat /dev/null >/etc/hosts && dig etcd.local" | ||
|
||
docker-dns-test-push: | ||
gcloud docker -- push gcr.io/etcd-development/etcd-dns-test:latest | ||
|
||
docker-dns-test-pull: | ||
docker pull gcr.io/etcd-development/etcd-dns-test:latest | ||
|
||
docker-dns-test-compile: | ||
docker run \ | ||
--rm \ | ||
--volume=`pwd`/:/etcd \ | ||
gcr.io/etcd-development/etcd-dns-test:latest \ | ||
/bin/bash -c "pushd /etcd && GO_BUILD_FLAGS=-v ./build && ./bin/etcd --version" | ||
|
||
docker-dns-test-run: | ||
docker run \ | ||
--rm \ | ||
--tty \ | ||
--dns 127.0.0.1 \ | ||
--volume=`pwd`/bin:/etcd \ | ||
--volume=`pwd`/integration/fixtures:/certs \ | ||
gcr.io/etcd-development/etcd-dns-test:latest \ | ||
/bin/bash -c "pushd /etcd && /run.sh && rm -rf infra*.etcd && popd" | ||
|
||
# TODO: add DNS SRV tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
FROM golang:1.9-stretch | ||
LABEL Description="Image for etcd DNS testing" | ||
RUN apt update -y | ||
RUN go get github.com/mattn/goreman | ||
RUN apt install -y bind9 | ||
|
||
RUN apt update -y \ | ||
&& apt install -y \ | ||
bind9 \ | ||
dnsutils | ||
|
||
RUN mkdir /var/bind | ||
RUN chown bind /var/bind | ||
ADD Procfile.tls /Procfile.tls | ||
ADD run.sh /run.sh | ||
|
||
ADD named.conf etcd.zone rdns.zone /etc/bind/ | ||
ADD resolv.conf /etc/resolv.conf | ||
CMD ["/run.sh"] | ||
|
||
RUN go get github.com/mattn/goreman | ||
CMD ["/run.sh"] |
This file was deleted.
Oops, something went wrong.