mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 00:34:24 -04:00
Fix Travis IPv6 and add k8s integration testing to CI (#194)
Updating travis yaml file to: * Force IPv6 to work in their VM environment * Enable docker (requires VM environment and sudo) * Run kubernetes integration tests in Travis
This commit is contained in:
@@ -102,7 +102,7 @@ kubectl to communicate with kubernetes running on the localhost:
|
||||
~~~
|
||||
#!/bin/bash
|
||||
|
||||
BASEDIR=`realpath $(dirname ${0})`
|
||||
BASEDIR=`readlink -e $(dirname ${0})`
|
||||
|
||||
${BASEDIR}/kubectl config set-cluster test-doc --server=http://localhost:8080
|
||||
${BASEDIR}/kubectl config set-context test-doc --cluster=test-doc
|
||||
@@ -343,12 +343,14 @@ TBD:
|
||||
* Do we need to generate synthetic zone records for namespaces?
|
||||
* Do we need to generate synthetic zone records for the skydns synthetic zones?
|
||||
* Test cases
|
||||
* ~~Implement test cases for http data parsing using dependency injection
|
||||
for http get operations.~~
|
||||
* Test with CoreDNS caching. CoreDNS caching for DNS response is working
|
||||
using the `cache` directive. Tested working using 20s cache timeout
|
||||
and A-record queries. Automate testing with cache in place.
|
||||
* Automate CoreDNS performance tests. Initially for zone files, and for
|
||||
pre-loaded k8s API cache.
|
||||
* Automate integration testing with kubernetes. (k8s launch and service start-up
|
||||
automation is in middleware/kubernetes/tests)
|
||||
* Try to get rid of kubernetes launch scripts by moving operations into
|
||||
.travis.yml file.
|
||||
* ~~Implement test cases for http data parsing using dependency injection
|
||||
for http get operations.~~
|
||||
* ~~Automate integration testing with kubernetes. (k8s launch and service start-up
|
||||
automation is in middleware/kubernetes/tests)~~
|
||||
|
||||
@@ -7,7 +7,6 @@ K8S_VERSION="v1.2.4"
|
||||
|
||||
ARCH="amd64"
|
||||
|
||||
|
||||
export K8S_VERSION
|
||||
export ARCH
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
PWD=`pwd`
|
||||
BASEDIR=`realpath $(dirname ${0})`
|
||||
BASEDIR=`readlink -e $(dirname ${0})`
|
||||
|
||||
cd ${BASEDIR}
|
||||
if [ ! -e kubectl ]; then
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
|
||||
# Running skydns based on instructions at: https://testdatamanagement.wordpress.com/2015/09/01/running-kubernetes-in-docker-with-dns-on-a-single-node/
|
||||
|
||||
PWD=`pwd`
|
||||
BASEDIR=`readlink -e $(dirname ${0})`
|
||||
|
||||
cd ${BASEDIR}
|
||||
|
||||
KUBECTL='./kubectl'
|
||||
|
||||
#RUN_SKYDNS="yes"
|
||||
@@ -15,7 +20,7 @@ wait_until_k8s_ready() {
|
||||
if [ "${?}" = "0" ]; then
|
||||
break
|
||||
else
|
||||
echo "sleeping for 5 seconds"
|
||||
echo "sleeping for 5 seconds (waiting for kubernetes to start)"
|
||||
sleep 5
|
||||
fi
|
||||
done
|
||||
@@ -37,3 +42,5 @@ if [ "${RUN_SKYDNS}" = "yes" ]; then
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
cd ${PWD}
|
||||
|
||||
@@ -1,16 +1,21 @@
|
||||
#!/bin/bash
|
||||
|
||||
PWD=`pwd`
|
||||
BASEDIR=`readlink -e $(dirname ${0})`
|
||||
|
||||
cd ${BASEDIR}
|
||||
|
||||
KUBECTL='./kubectl'
|
||||
|
||||
wait_until_k8s_ready() {
|
||||
# Wait until kubernetes is up and fully responsive
|
||||
while :
|
||||
do
|
||||
${KUBECTL} get nodes 2>/dev/null | grep -q '127.0.0.1'
|
||||
${KUBECTL} get nodes 2>/dev/null | grep -q '127.0.0.1'
|
||||
if [ "${?}" = "0" ]; then
|
||||
break
|
||||
else
|
||||
echo "sleeping for 5 seconds"
|
||||
echo "sleeping for 5 seconds (waiting for kubernetes to start)"
|
||||
sleep 5
|
||||
fi
|
||||
done
|
||||
@@ -78,3 +83,5 @@ run_and_expose_service webserver test nginx 80
|
||||
echo ""
|
||||
echo "Services exposed:"
|
||||
${KUBECTL} get services --all-namespaces
|
||||
|
||||
cd ${PWD}
|
||||
|
||||
Reference in New Issue
Block a user