mirror of
https://github.com/coredns/coredns.git
synced 2025-10-29 17:24:20 -04:00
middleware/auto: add (#333)
Add auto-load middleware that automatically picks up zones. Every X seconds it will scan for new zones. Add tests and documentation. Make 'make test' use -race.
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/miekg/coredns/middleware/test"
|
||||
|
||||
"github.com/miekg/dns"
|
||||
)
|
||||
|
||||
@@ -28,7 +29,7 @@ func TestZoneReload(t *testing.T) {
|
||||
t.Fatalf("failed to parse zone: %s", err)
|
||||
}
|
||||
|
||||
z.Reload(nil)
|
||||
z.Reload()
|
||||
|
||||
if _, _, _, res := z.Lookup("miek.nl.", dns.TypeSOA, false); res != Success {
|
||||
t.Fatalf("failed to lookup, got %d", res)
|
||||
|
||||
Reference in New Issue
Block a user