aboutsummaryrefslogtreecommitdiff
path: root/plugin/file/glue_test.go
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2018-08-29 12:26:22 +0100
committerGravatar GitHub <noreply@github.com> 2018-08-29 12:26:22 +0100
commitba1efee4f1c2258e43b1bd8035ac6d1208675b95 (patch)
tree17ec11d7616120357c2828b6374d02ab081c5e42 /plugin/file/glue_test.go
parenteb51e8bac90fac86d34c9e1cb89b04ea0936b034 (diff)
downloadcoredns-ba1efee4f1c2258e43b1bd8035ac6d1208675b95.tar.gz
coredns-ba1efee4f1c2258e43b1bd8035ac6d1208675b95.tar.zst
coredns-ba1efee4f1c2258e43b1bd8035ac6d1208675b95.zip
Default to scrubbing replies in the server (#2012)
Every plugin needs to deal with EDNS0 and should call Scrub to make a message fit the client's buffer. Move this functionality into the server and wrapping the ResponseWriter into a ScrubWriter that handles these bits for us. Result: Less code and faster, because multiple chained plugins could all be calling scrub and SizeAndDo - now there is just one place. Most tests in file/* and dnssec/* needed adjusting because in those unit tests you don't see OPT RRs anymore. The DNSSEC signer was also looking at the returned OPT RR to see if it needed to sign - as those are now added by the server (and thus later), this needed to change slightly. Scrub itself still exist (for backward compat reasons), but has been made a noop. Scrub has been renamed to scrub as it should not be used by external plugins. Fixes: #2010 Signed-off-by: Miek Gieben <miek@miek.nl>
Diffstat (limited to 'plugin/file/glue_test.go')
-rw-r--r--plugin/file/glue_test.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/plugin/file/glue_test.go b/plugin/file/glue_test.go
index 9cb71a993..e6f1e027f 100644
--- a/plugin/file/glue_test.go
+++ b/plugin/file/glue_test.go
@@ -11,8 +11,7 @@ import (
"github.com/miekg/dns"
)
-// another personal zone (helps in testing as my secondary is NSD
-// atoom = atom in English.
+// another personal zone (helps in testing as my secondary is NSD, atoom = atom in English.
var atoomTestCases = []test.Case{
{
Qname: atoom, Qtype: dns.TypeNS, Do: true,
@@ -23,7 +22,7 @@ var atoomTestCases = []test.Case{
test.RRSIG("atoom.net. 1800 IN RRSIG NS 8 2 1800 20170112031301 20161213031301 53289 atoom.net. DLe+G1 jlw="),
},
Extra: []dns.RR{
- test.OPT(4096, true),
+ // test.OPT(4096, true), // added by server, not test in this unit test.
test.A("linode.atoom.net. 1800 IN A 176.58.119.54"),
test.AAAA("linode.atoom.net. 1800 IN AAAA 2a01:7e00::f03c:91ff:fe79:234c"),
test.RRSIG("linode.atoom.net. 1800 IN RRSIG A 8 3 1800 20170112031301 20161213031301 53289 atoom.net. Z4Ka4OLDoyxj72CL vkI="),