aboutsummaryrefslogtreecommitdiff
path: root/plugin/kubernetes/handler_pod_insecure_test.go
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2018-01-05 17:48:08 +0000
committerGravatar GitHub <noreply@github.com> 2018-01-05 17:48:08 +0000
commitf62189372af6d866a8bce890bf44a0284a599b59 (patch)
tree535ef32be90a4041971c27470ab78829fd4e5451 /plugin/kubernetes/handler_pod_insecure_test.go
parent58221f55db5675c6107d19679c46a216ed072aca (diff)
downloadcoredns-f62189372af6d866a8bce890bf44a0284a599b59.tar.gz
coredns-f62189372af6d866a8bce890bf44a0284a599b59.tar.zst
coredns-f62189372af6d866a8bce890bf44a0284a599b59.zip
plugin/kubernetes: partial fix for crazy pod queries (#1349)
This is probably the first in a series to fix "crazy" pod queries. If the namespace doesn't exist return NXDOMAIN. It might be worth extending this 1:1 to findServices as well.
Diffstat (limited to 'plugin/kubernetes/handler_pod_insecure_test.go')
-rw-r--r--plugin/kubernetes/handler_pod_insecure_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugin/kubernetes/handler_pod_insecure_test.go b/plugin/kubernetes/handler_pod_insecure_test.go
index 276d4bbb3..6dcfd5629 100644
--- a/plugin/kubernetes/handler_pod_insecure_test.go
+++ b/plugin/kubernetes/handler_pod_insecure_test.go
@@ -25,6 +25,13 @@ var podModeInsecureCases = []test.Case{
test.A("172-0-0-2.podns.pod.cluster.local. 5 IN A 172.0.0.2"),
},
},
+ {
+ Qname: "blah.pod-nons.pod.cluster.local.", Qtype: dns.TypeA,
+ Rcode: dns.RcodeNameError,
+ Ns: []dns.RR{
+ test.SOA("cluster.local. 300 IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1515173576 7200 1800 86400 30"),
+ },
+ },
}
func TestServeDNSModeInsecure(t *testing.T) {