diff options
author | 2018-11-16 14:42:49 +0100 | |
---|---|---|
committer | 2018-11-16 08:42:49 -0500 | |
commit | 8dbe1fbee227d6830d61a169eb947f4c243c76d6 (patch) | |
tree | 31b34683a80a659e76e2076865d76a77ef48dbea /plugin/kubernetes/reverse_test.go | |
parent | 3f6dfba1f0e9cd6c858f88891550d09904b7814d (diff) | |
download | coredns-8dbe1fbee227d6830d61a169eb947f4c243c76d6.tar.gz coredns-8dbe1fbee227d6830d61a169eb947f4c243c76d6.tar.zst coredns-8dbe1fbee227d6830d61a169eb947f4c243c76d6.zip |
Set SOA record TTL as min of TTL/MINIMUM (#2295)
* Set SOA record TTL as min of TTL/MINIMUM
According to
https://tools.ietf.org/html/rfc2308#section-3:
The TTL of this record is set from the minimum
of the MINIMUM field of the SOA record and the
TTL of the SOA itself, and indicates how long a
resolver may cache the negative answer.
Set the TTL accordingly so as to not always
negative cache SOA records for 300 seconds.
* Inline min func
* Update SOA record tests
* Fix types
Diffstat (limited to 'plugin/kubernetes/reverse_test.go')
-rw-r--r-- | plugin/kubernetes/reverse_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugin/kubernetes/reverse_test.go b/plugin/kubernetes/reverse_test.go index a706b7585..3f0b75235 100644 --- a/plugin/kubernetes/reverse_test.go +++ b/plugin/kubernetes/reverse_test.go @@ -151,35 +151,35 @@ func TestReverse(t *testing.T) { Qname: "101.0.0.10.in-addr.arpa.", Qtype: dns.TypePTR, Rcode: dns.RcodeNameError, Ns: []dns.RR{ - test.SOA("0.10.in-addr.arpa. 300 IN SOA ns.dns.0.10.in-addr.arpa. hostmaster.0.10.in-addr.arpa. 1502782828 7200 1800 86400 60"), + test.SOA("0.10.in-addr.arpa. 30 IN SOA ns.dns.0.10.in-addr.arpa. hostmaster.0.10.in-addr.arpa. 1502782828 7200 1800 86400 60"), }, }, { Qname: "example.org.cluster.local.", Qtype: dns.TypePTR, Rcode: dns.RcodeNameError, Ns: []dns.RR{ - test.SOA("cluster.local. 300 IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1502989566 7200 1800 86400 60"), + test.SOA("cluster.local. 30 IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1502989566 7200 1800 86400 60"), }, }, { Qname: "svc1.testns.svc.cluster.local.", Qtype: dns.TypePTR, Rcode: dns.RcodeSuccess, Ns: []dns.RR{ - test.SOA("cluster.local. 300 IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1502989566 7200 1800 86400 60"), + test.SOA("cluster.local. 30 IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1502989566 7200 1800 86400 60"), }, }, { Qname: "svc1.testns.svc.0.10.in-addr.arpa.", Qtype: dns.TypeA, Rcode: dns.RcodeNameError, Ns: []dns.RR{ - test.SOA("0.10.in-addr.arpa. 300 IN SOA ns.dns.0.10.in-addr.arpa. hostmaster.0.10.in-addr.arpa. 1502989566 7200 1800 86400 60"), + test.SOA("0.10.in-addr.arpa. 30 IN SOA ns.dns.0.10.in-addr.arpa. hostmaster.0.10.in-addr.arpa. 1502989566 7200 1800 86400 60"), }, }, { Qname: "100.0.0.10.cluster.local.", Qtype: dns.TypePTR, Rcode: dns.RcodeNameError, Ns: []dns.RR{ - test.SOA("cluster.local. 300 IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1502989566 7200 1800 86400 60"), + test.SOA("cluster.local. 30 IN SOA ns.dns.cluster.local. hostmaster.cluster.local. 1502989566 7200 1800 86400 60"), }, }, } |