mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 08:44:17 -04:00
Add secondary support
Allow specifying a primary server and retrieve the zone's content. Add tests and an Expired bool to zone struct, to stop server zones that are expired. The zone is retrieved on Startup, no updates of changed content are done. We also don't respond to notifies yet.
This commit is contained in:
@@ -107,6 +107,15 @@ func TestLookup(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestLookupNil(t *testing.T) {
|
||||
fm := File{Next: coretest.ErrorHandler(), Zones: Zones{Z: map[string]*Zone{testzone: nil}, Names: []string{testzone}}}
|
||||
ctx := context.TODO()
|
||||
|
||||
m := dnsTestCases[0].Msg()
|
||||
rec := middleware.NewResponseRecorder(&middleware.TestResponseWriter{})
|
||||
fm.ServeDNS(ctx, rec, m)
|
||||
}
|
||||
|
||||
func BenchmarkLookup(b *testing.B) {
|
||||
zone, err := Parse(strings.NewReader(dbMiekNL), testzone, "stdin")
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user