aboutsummaryrefslogtreecommitdiff
path: root/plugin/hosts/hosts_test.go
diff options
context:
space:
mode:
authorGravatar Pat Moroney <pat@moroney.email> 2017-10-31 01:40:47 -0600
committerGravatar Miek Gieben <miek@miek.nl> 2017-10-31 07:40:47 +0000
commit1d4ac4adbbfa7f2f4d3549e3e77056f2503d8f8e (patch)
treec6bbaa2606ee41d090467b1519cc0d095a0163f3 /plugin/hosts/hosts_test.go
parent87c9f00c83212734d7ab0172ac34aee5bd271b07 (diff)
downloadcoredns-1d4ac4adbbfa7f2f4d3549e3e77056f2503d8f8e.tar.gz
coredns-1d4ac4adbbfa7f2f4d3549e3e77056f2503d8f8e.tar.zst
coredns-1d4ac4adbbfa7f2f4d3549e3e77056f2503d8f8e.zip
add goroutine to check hosts file for updates (#1180)
* add goroutine to check hosts file for updates * rename parseFile to parseReader, remove extra error check
Diffstat (limited to 'plugin/hosts/hosts_test.go')
-rw-r--r--plugin/hosts/hosts_test.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/plugin/hosts/hosts_test.go b/plugin/hosts/hosts_test.go
index 3c9405562..6d5f7955f 100644
--- a/plugin/hosts/hosts_test.go
+++ b/plugin/hosts/hosts_test.go
@@ -3,7 +3,6 @@ package hosts
import (
"strings"
"testing"
- "time"
"github.com/coredns/coredns/plugin/pkg/dnstest"
"github.com/coredns/coredns/plugin/test"
@@ -13,8 +12,8 @@ import (
)
func TestLookupA(t *testing.T) {
- h := Hosts{Next: test.ErrorHandler(), Hostsfile: &Hostsfile{expire: time.Now().Add(1 * time.Hour), Origins: []string{"."}}}
- h.Parse(strings.NewReader(hostsExample))
+ h := Hosts{Next: test.ErrorHandler(), Hostsfile: &Hostsfile{Origins: []string{"."}}}
+ h.parseReader(strings.NewReader(hostsExample))
ctx := context.TODO()