mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 02:33:14 -04:00
respond with REFUSED when max_concurrent is exceeded to avoid caching it (#4326)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
This commit is contained in:
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user