diff options
Diffstat (limited to 'plugin/hosts/hosts_test.go')
-rw-r--r-- | plugin/hosts/hosts_test.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugin/hosts/hosts_test.go b/plugin/hosts/hosts_test.go index db3876132..1b74ef9ee 100644 --- a/plugin/hosts/hosts_test.go +++ b/plugin/hosts/hosts_test.go @@ -2,6 +2,7 @@ package hosts import ( "context" + "io" "strings" "testing" @@ -11,6 +12,8 @@ import ( "github.com/miekg/dns" ) +func (h *Hostsfile) parseReader(r io.Reader) { h.hmap = h.parse(r, h.inline) } + func TestLookupA(t *testing.T) { h := Hosts{Next: test.ErrorHandler(), Hostsfile: &Hostsfile{Origins: []string{"."}}} h.parseReader(strings.NewReader(hostsExample)) |