aboutsummaryrefslogtreecommitdiff
path: root/test/kubernetes_api_fallthrough_test.go
diff options
context:
space:
mode:
authorGravatar Chris O'Haver <cohaver@infoblox.com> 2017-10-25 15:40:48 -0400
committerGravatar John Belamaric <jbelamaric@infoblox.com> 2017-10-25 15:40:48 -0400
commite8184d3a5ace2770487a689cbc72be4303b53f2e (patch)
tree4b20fa60f55299a3085b3328296721c69c523ea7 /test/kubernetes_api_fallthrough_test.go
parentc2d93f7182a55e0e9a819f44b87735f635200423 (diff)
downloadcoredns-e8184d3a5ace2770487a689cbc72be4303b53f2e.tar.gz
coredns-e8184d3a5ace2770487a689cbc72be4303b53f2e.tar.zst
coredns-e8184d3a5ace2770487a689cbc72be4303b53f2e.zip
plugin/kubernetes: Modify integration tests for coredns/ci (#1152)
* integration ci * rename test * unfunctionalize DoIntegrationTests * alphabetize expected answers * Enable out-of-cluster test * Enable out-of-cluster test * move integration tests back to ci repo
Diffstat (limited to 'test/kubernetes_api_fallthrough_test.go')
-rw-r--r--test/kubernetes_api_fallthrough_test.go49
1 files changed, 0 insertions, 49 deletions
diff --git a/test/kubernetes_api_fallthrough_test.go b/test/kubernetes_api_fallthrough_test.go
deleted file mode 100644
index d12789c24..000000000
--- a/test/kubernetes_api_fallthrough_test.go
+++ /dev/null
@@ -1,49 +0,0 @@
-// +build k8s
-
-package test
-
-import (
- "testing"
-
- "github.com/coredns/coredns/plugin/test"
-
- "github.com/miekg/dns"
-)
-
-func TestKubernetesAPIFallthrough(t *testing.T) {
- tests := []test.Case{
- {
- Qname: "svc-1-a.test-1.svc.cluster.local.", Qtype: dns.TypeA,
- Rcode: dns.RcodeSuccess,
- Answer: []dns.RR{
- test.A("svc-1-a.test-1.svc.cluster.local. 303 IN A 10.0.0.100"),
- },
- },
- }
-
- corefile :=
- `.:0 {
- kubernetes cluster.local {
- endpoint http://nonexistance:8080,http://invalidip:8080,http://localhost:8080
- namespaces test-1
- pods disabled
- }`
-
- server, udp, _, err := CoreDNSServerAndPorts(corefile)
- if err != nil {
- t.Fatalf("Could not get CoreDNS serving instance: %s", err)
- }
- defer server.Stop()
-
- for _, tc := range tests {
-
- c := new(dns.Client)
- m := tc.Msg()
-
- res, _, err := c.Exchange(m, udp)
- if err != nil {
- t.Fatalf("Could not send query: %s", err)
- }
- test.SortAndCheck(t, res, tc)
- }
-}