mirror of
https://github.com/coredns/coredns.git
synced 2025-12-08 19:35:10 -05:00
middleware/file: don't reload zone when SOA isn't changed (#707)
* middleware/file: don't reload zone when SOA isn't changed Give Parse an extra argument which is the SOA's serial, if > 0 we check against the just parsed SOA and then just return. Most notable use is in reload.go which is both used in the file and auto middleware. Fixes #415 * PR comments
This commit is contained in:
@@ -6,14 +6,14 @@ import (
|
||||
)
|
||||
|
||||
func TestParseNSEC3PARAM(t *testing.T) {
|
||||
_, err := Parse(strings.NewReader(nsec3paramTest), "miek.nl", "stdin")
|
||||
_, err := Parse(strings.NewReader(nsec3paramTest), "miek.nl", "stdin", 0)
|
||||
if err == nil {
|
||||
t.Fatalf("expected error when reading zone, got nothing")
|
||||
}
|
||||
}
|
||||
|
||||
func TestParseNSEC3(t *testing.T) {
|
||||
_, err := Parse(strings.NewReader(nsec3Test), "miek.nl", "stdin")
|
||||
_, err := Parse(strings.NewReader(nsec3Test), "miek.nl", "stdin", 0)
|
||||
if err == nil {
|
||||
t.Fatalf("expected error when reading zone, got nothing")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user