mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 02:33:14 -04:00
plugin/file: rework outgoing axfr (#3227)
* plugin/file: rework outgoing axfr Signed-off-by: Miek Gieben <miek@miek.nl> * Fix test Signed-off-by: Miek Gieben <miek@miek.nl> * Actually properly test xfr Signed-off-by: Miek Gieben <miek@miek.nl> * Fix test Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
@@ -30,12 +30,12 @@ func TestWatcher(t *testing.T) {
|
||||
|
||||
a.Walk()
|
||||
|
||||
// example.org and example.com should exist
|
||||
if x := len(a.Zones.Z["example.org."].All()); x != 4 {
|
||||
t.Fatalf("Expected 4 RRs, got %d", x)
|
||||
// example.org and example.com should exist, we have 3 apex rrs and 1 "real" record. All() returns the non-apex ones.
|
||||
if x := len(a.Zones.Z["example.org."].All()); x != 1 {
|
||||
t.Fatalf("Expected 1 RRs, got %d", x)
|
||||
}
|
||||
if x := len(a.Zones.Z["example.com."].All()); x != 4 {
|
||||
t.Fatalf("Expected 4 RRs, got %d", x)
|
||||
if x := len(a.Zones.Z["example.com."].All()); x != 1 {
|
||||
t.Fatalf("Expected 1 RRs, got %d", x)
|
||||
}
|
||||
|
||||
// Now remove one file, rescan and see if it's gone.
|
||||
|
||||
Reference in New Issue
Block a user