coredns/middleware/file/nsec3_test.go
Miek Gieben eb1f21bfff Drop NSEC3 zone (#120)
Error out when parsing and transferring such a zone. If we would serve
it we would give out the wrong answers, leading to (probably) validation
failures...

Fixes #114
2016-04-14 07:33:03 +01:00

20 lines
556 B
Go

package file
import (
"strings"
"testing"
)
func TestParseNSEC3(t *testing.T) {
_, err := Parse(strings.NewReader(nsec3_test), "miek.nl", "stdin")
if err == nil {
t.Fatalf("expected error when reading zone, got nothing")
}
}
const nsec3_test = `miek.nl. 1800 IN SOA linode.atoom.net. miek.miek.nl. 1460175181 14400 3600 604800 14400
miek.nl. 1800 IN NS omval.tednet.nl.
miek.nl. 1800 IN NS linode.atoom.net.
miek.nl. 1800 IN NS ext.ns.whyscream.net.
miek.nl. 1800 IN NS ns-ext.nlnetlabs.nl.
miek.nl. 0 IN NSEC3PARAM 1 0 5 A3DEBC9CC4F695C7`