diff options
author | 2019-02-12 16:09:33 +0000 | |
---|---|---|
committer | 2019-02-12 09:09:33 -0700 | |
commit | 4b402e000d22a18b333e5b136e43de634f131a99 (patch) | |
tree | afaa2f76ede63d58280842b83633034ce2cc50e0 /plugin/hosts/hostsfile_test.go | |
parent | e47d881461a947dbcc1d285d8a8d9f6a79e77fd7 (diff) | |
download | coredns-4b402e000d22a18b333e5b136e43de634f131a99.tar.gz coredns-4b402e000d22a18b333e5b136e43de634f131a99.tar.zst coredns-4b402e000d22a18b333e5b136e43de634f131a99.zip |
plugin/hosts provide more configuration flexibility (#2535)
* plugin/hosts provide more configuration flexibility
This patch adds few features to the host plugin
* no-reverse (both as first argument on the plugin line and inline)
disable the automatic generation of reserve entries for hosts
* ttl <duration> (inline only atm)
allows to change the default ttl (default 5 minutes)
* reload <duration> (inline only atm)
allows to change the reloading interval (default 5s)
* plugin/hosts remove superfluous parameters to parse
Diffstat (limited to 'plugin/hosts/hostsfile_test.go')
-rw-r--r-- | plugin/hosts/hostsfile_test.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugin/hosts/hostsfile_test.go b/plugin/hosts/hostsfile_test.go index 26a2916f0..db0e63d75 100644 --- a/plugin/hosts/hostsfile_test.go +++ b/plugin/hosts/hostsfile_test.go @@ -12,7 +12,11 @@ import ( ) func testHostsfile(file string) *Hostsfile { - h := &Hostsfile{Origins: []string{"."}} + h := &Hostsfile{ + Origins: []string{"."}, + hmap: newHostsMap(), + options: newOptions(), + } h.parseReader(strings.NewReader(file)) return h } |