Skip to content

Commit

Permalink
Makefile: add 'docker-dns-srv-*'
Browse files Browse the repository at this point in the history
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
  • Loading branch information
gyuho committed Oct 4, 2017
1 parent 6a916e4 commit d8c470e
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ test-all:
clean:
rm -f ./*.log
rm -f ./bin/Dockerfile-release
rm -rf ./bin/*.etcd
rm -rf ./gopath
rm -rf ./release
rm -f ./integration/127.0.0.1:* ./integration/localhost:*
Expand Down Expand Up @@ -104,5 +105,34 @@ docker-dns-test-run:
gcr.io/etcd-development/etcd-dns-test:$(GO_VERSION) \
/bin/bash -c "pushd /etcd && /run.sh && rm -rf m*.etcd && popd"

# TODO: add DNS SRV tests
# build base container image for DNS/SRV testing
docker-dns-srv-test-build:
docker build \
--tag gcr.io/etcd-development/etcd-dns-srv-test:$(GO_VERSION) \
--file ./e2e/docker-dns-srv/Dockerfile \
./e2e/docker-dns-srv

docker run \
--rm \
--dns 127.0.0.1 \
gcr.io/etcd-development/etcd-dns-srv-test:$(GO_VERSION) \
/bin/bash -c "/etc/init.d/bind9 start && cat /dev/null >/etc/hosts && dig +noall +answer SRV _etcd-client._tcp.etcd-srv.local && dig +noall +answer SRV _etcd-client-ssl._tcp.etcd-srv.local && dig +noall +answer SRV _etcd-server._tcp.etcd-srv.local && dig +noall +answer SRV _etcd-server-ssl._tcp.etcd-srv.local && dig +noall +answer m1.etcd-srv.local m2.etcd-srv.local m3.etcd-srv.local"

docker-dns-srv-test-push:
gcloud docker -- push gcr.io/etcd-development/etcd-dns-srv-test:$(GO_VERSION)

docker-dns-srv-test-pull:
docker pull gcr.io/etcd-development/etcd-dns-srv-test:$(GO_VERSION)

# run DNS/SRV tests inside container
docker-dns-srv-test-run:
docker run \
--rm \
--tty \
--dns 127.0.0.1 \
--volume=`pwd`/bin:/etcd \
gcr.io/etcd-development/etcd-dns-srv-test:$(GO_VERSION) \
/bin/bash -c "pushd /etcd && /run.sh && rm -rf m*.etcd && popd"

# TODO: run DNS/SRV with TLS
# TODO: add DNS integration tests

0 comments on commit d8c470e

Please sign in to comment.