aboutsummaryrefslogtreecommitdiff
path: root/plugin/pkg/response
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/pkg/response')
-rw-r--r--plugin/pkg/response/typify_test.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/plugin/pkg/response/typify_test.go b/plugin/pkg/response/typify_test.go
index fca6ba100..3d9abdf7c 100644
--- a/plugin/pkg/response/typify_test.go
+++ b/plugin/pkg/response/typify_test.go
@@ -60,6 +60,16 @@ func TestTypifyImpossible(t *testing.T) {
}
}
+func TestTypifyRefused(t *testing.T) {
+ m := new(dns.Msg)
+ m.SetQuestion("foo.example.org.", dns.TypeA)
+ m.Rcode = dns.RcodeRefused
+ mt, _ := Typify(m, time.Now().UTC())
+ if mt != OtherError {
+ t.Errorf("Refused message not typified as OtherError, got %s", mt)
+ }
+}
+
func delegationMsg() *dns.Msg {
return &dns.Msg{
Ns: []dns.RR{