diff options
Diffstat (limited to 'plugin/hosts/hosts_test.go')
-rw-r--r-- | plugin/hosts/hosts_test.go | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/plugin/hosts/hosts_test.go b/plugin/hosts/hosts_test.go index e412b7ae5..975710bb3 100644 --- a/plugin/hosts/hosts_test.go +++ b/plugin/hosts/hosts_test.go @@ -12,10 +12,19 @@ import ( "github.com/miekg/dns" ) -func (h *Hostsfile) parseReader(r io.Reader) { h.hmap = h.parse(r, h.inline) } +func (h *Hostsfile) parseReader(r io.Reader) { + h.hmap = h.parse(r) +} func TestLookupA(t *testing.T) { - h := Hosts{Next: test.ErrorHandler(), Hostsfile: &Hostsfile{Origins: []string{"."}}} + h := Hosts{ + Next: test.ErrorHandler(), + Hostsfile: &Hostsfile{ + Origins: []string{"."}, + hmap: newHostsMap(), + options: newOptions(), + }, + } h.parseReader(strings.NewReader(hostsExample)) ctx := context.TODO() @@ -90,4 +99,6 @@ const hostsExample = ` ::1 localhost localhost.domain 10.0.0.1 example.org ::FFFF:10.0.0.2 example.com +reload 5s +timeout 3600 ` |