aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGravatar Chris O'Haver <cohaver@infoblox.com> 2021-09-14 04:08:22 -0400
committerGravatar GitHub <noreply@github.com> 2021-09-14 10:08:22 +0200
commit158ad2d73839632f8866b2934006ca4515581840 (patch)
tree3310a269c6e108efb1f9c54d1056475df2bd1f0d /test
parent8f7162c42b9de0a4a4f57b8869c31349b2ab4907 (diff)
downloadcoredns-158ad2d73839632f8866b2934006ca4515581840.tar.gz
coredns-158ad2d73839632f8866b2934006ca4515581840.tar.zst
coredns-158ad2d73839632f8866b2934006ca4515581840.zip
plugin/file/auto: Write CNAME answer to client even if target lookup is SERVFAIL (#4863)
* write cname answer to client even if target lookup is servfail Signed-off-by: Chris O'Haver <cohaver@infoblox.com> * fix existing unit test expectations Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
Diffstat (limited to 'test')
-rw-r--r--test/file_upstream_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/file_upstream_test.go b/test/file_upstream_test.go
index 6b796f90d..77ffa1d6e 100644
--- a/test/file_upstream_test.go
+++ b/test/file_upstream_test.go
@@ -77,10 +77,17 @@ func TestFileUpstreamError(t *testing.T) {
},
"srvfail": {
Qname: "srvfail.example.org.", Qtype: dns.TypeA,
+ Answer: []dns.RR{
+ test.CNAME("srvfail.example.org. 3600 IN CNAME srvfail.example.net."),
+ },
Rcode: dns.RcodeServerFailure,
},
"srvfail-chain": {
Qname: "chain2.example.org.", Qtype: dns.TypeA,
+ Answer: []dns.RR{
+ test.CNAME("chain2.example.org. 3600 IN CNAME srvfail.example.org."),
+ test.CNAME("srvfail.example.org. 3600 IN CNAME srvfail.example.net."),
+ },
Rcode: dns.RcodeServerFailure,
},
"nodata": {