aboutsummaryrefslogtreecommitdiff
path: root/plugin/hosts/setup_test.go
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2018-01-09 22:29:19 +0000
committerGravatar GitHub <noreply@github.com> 2018-01-09 22:29:19 +0000
commitcced1a4c12b3a6646e186d14ce89bf4f60a632f8 (patch)
treef18a89907637ffdb4d8064da2c8729b0314c7159 /plugin/hosts/setup_test.go
parenta19ea63d3a719a98104c74a776afd71d5d94490a (diff)
downloadcoredns-cced1a4c12b3a6646e186d14ce89bf4f60a632f8.tar.gz
coredns-cced1a4c12b3a6646e186d14ce89bf4f60a632f8.tar.zst
coredns-cced1a4c12b3a6646e186d14ce89bf4f60a632f8.zip
pkg/fall: make Zero and Root vars not funcs (#1367)
These can be just vars. Think that was intended as well.
Diffstat (limited to 'plugin/hosts/setup_test.go')
-rw-r--r--plugin/hosts/setup_test.go22
1 files changed, 11 insertions, 11 deletions
diff --git a/plugin/hosts/setup_test.go b/plugin/hosts/setup_test.go
index 3c4f94948..d23170f1f 100644
--- a/plugin/hosts/setup_test.go
+++ b/plugin/hosts/setup_test.go
@@ -19,43 +19,43 @@ func TestHostsParse(t *testing.T) {
{
`hosts
`,
- false, "/etc/hosts", nil, fall.Zero(),
+ false, "/etc/hosts", nil, fall.Zero,
},
{
`hosts /tmp`,
- false, "/tmp", nil, fall.Zero(),
+ false, "/tmp", nil, fall.Zero,
},
{
`hosts /etc/hosts miek.nl.`,
- false, "/etc/hosts", []string{"miek.nl."}, fall.Zero(),
+ false, "/etc/hosts", []string{"miek.nl."}, fall.Zero,
},
{
`hosts /etc/hosts miek.nl. pun.gent.`,
- false, "/etc/hosts", []string{"miek.nl.", "pun.gent."}, fall.Zero(),
+ false, "/etc/hosts", []string{"miek.nl.", "pun.gent."}, fall.Zero,
},
{
`hosts {
fallthrough
}`,
- false, "/etc/hosts", nil, fall.Root(),
+ false, "/etc/hosts", nil, fall.Root,
},
{
`hosts /tmp {
fallthrough
}`,
- false, "/tmp", nil, fall.Root(),
+ false, "/tmp", nil, fall.Root,
},
{
`hosts /etc/hosts miek.nl. {
fallthrough
}`,
- false, "/etc/hosts", []string{"miek.nl."}, fall.Root(),
+ false, "/etc/hosts", []string{"miek.nl."}, fall.Root,
},
{
`hosts /etc/hosts miek.nl 10.0.0.9/8 {
fallthrough
}`,
- false, "/etc/hosts", []string{"miek.nl.", "10.in-addr.arpa."}, fall.Root(),
+ false, "/etc/hosts", []string{"miek.nl.", "10.in-addr.arpa."}, fall.Root,
},
}
@@ -105,7 +105,7 @@ func TestHostsInlineParse(t *testing.T) {
`example.org.`,
},
},
- fall.Root(),
+ fall.Root,
},
{
`hosts highly_unlikely_to_exist_hosts_file example.org {
@@ -117,7 +117,7 @@ func TestHostsInlineParse(t *testing.T) {
`example.org.`,
},
},
- fall.Zero(),
+ fall.Zero,
},
{
`hosts highly_unlikely_to_exist_hosts_file example.org {
@@ -126,7 +126,7 @@ func TestHostsInlineParse(t *testing.T) {
}`,
true,
map[string][]string{},
- fall.Root(),
+ fall.Root,
},
}