mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 08:44:17 -04:00
Type.extra (#1538)
* Revert "pkg/typify: empty messages are OtherError (#1531)"
This reverts commit fc1d73ffa9.
* plugin/cache: add failsafeTTL
If we can not see what TTL we should put on a message to be cached, use
5 seconds as minimal TTL. We used to apply the maximum TTL to these
messages.
This commit is contained in:
11
plugin/cache/cache_test.go
vendored
11
plugin/cache/cache_test.go
vendored
@@ -22,7 +22,6 @@ type cacheTestCase struct {
|
||||
Authoritative bool
|
||||
RecursionAvailable bool
|
||||
Truncated bool
|
||||
Response bool
|
||||
shouldCache bool
|
||||
}
|
||||
|
||||
@@ -112,15 +111,6 @@ var cacheTestCases = []cacheTestCase{
|
||||
},
|
||||
shouldCache: false,
|
||||
},
|
||||
{
|
||||
// Response with only something in the additional, this should not be cached.
|
||||
Response: true,
|
||||
in: test.Case{
|
||||
Qname: "example.org.", Qtype: dns.TypeMX,
|
||||
Extra: []dns.RR{test.MX("example.org. 1800 IN MX 1 mx.example.org.")},
|
||||
},
|
||||
shouldCache: false,
|
||||
},
|
||||
{
|
||||
RecursionAvailable: true, Authoritative: true,
|
||||
Case: test.Case{
|
||||
@@ -150,7 +140,6 @@ func cacheMsg(m *dns.Msg, tc cacheTestCase) *dns.Msg {
|
||||
m.AuthenticatedData = tc.AuthenticatedData
|
||||
m.Authoritative = tc.Authoritative
|
||||
m.Rcode = tc.Rcode
|
||||
m.Response = tc.Response
|
||||
m.Truncated = tc.Truncated
|
||||
m.Answer = tc.in.Answer
|
||||
m.Ns = tc.in.Ns
|
||||
|
||||
Reference in New Issue
Block a user