diff options
author | 2017-08-04 15:41:55 +0200 | |
---|---|---|
committer | 2017-08-04 09:41:55 -0400 | |
commit | d0d7f4c89abebcfb5783fcf1ea4fe1a2090e9f11 (patch) | |
tree | 8ff7da72af232e139d3892cf38315c2184402fa2 /test | |
parent | 2c0fc3182caa2d76a2c83a2a3b85ec5c5fa8f915 (diff) | |
download | coredns-d0d7f4c89abebcfb5783fcf1ea4fe1a2090e9f11.tar.gz coredns-d0d7f4c89abebcfb5783fcf1ea4fe1a2090e9f11.tar.zst coredns-d0d7f4c89abebcfb5783fcf1ea4fe1a2090e9f11.zip |
Kubernetes srv (#823)
* Treat absence of port/service in SRV as wildcard
Normally, a SRV-request should have the form
_<service>._<port>.<name>.<zone>. The k8s peer-finder which is used for
bootstrapping by some applications will however query for SRV at
<name>.<zone>.
To compensate for this behaviour, treat the absence of _<service> and
_<port> as wildcards.
* Modified tests with new SRV behaviour
Added a testcase for a SRV request without port & service
Removed now valid query from invalidSRVQueries
* Forgot to run gofmt on test/kubernetes_test.go
Diffstat (limited to 'test')
-rw-r--r-- | test/kubernetes_test.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/kubernetes_test.go b/test/kubernetes_test.go index c0c836911..ac5414743 100644 --- a/test/kubernetes_test.go +++ b/test/kubernetes_test.go @@ -207,8 +207,11 @@ var dnsTestCases = []test.Case{ }, { Qname: "svc-1-a.test-1.svc.cluster.local.", Qtype: dns.TypeSRV, - Rcode: dns.RcodeNameError, - Answer: []dns.RR{}, + Rcode: dns.RcodeSuccess, + Answer: []dns.RR{ + test.SRV("_http._tcp.svc-1-a.test-1.svc.cluster.local. 303 IN SRV 10 100 80 svc-1-a.test-1.svc.cluster.local."), + test.SRV("_https._tcp.svc-1-a.test-1.svc.cluster.local. 303 IN SRV 10 100 443 svc-1-a.test-1.svc.cluster.local."), + }, }, { Qname: "10-20-0-101.test-1.pod.cluster.local.", Qtype: dns.TypeA, |