diff options
author | 2018-01-07 16:32:59 +0000 | |
---|---|---|
committer | 2018-01-07 16:32:59 +0000 | |
commit | c6febe6250361eee580dbb8a601a444f23ed7ac2 (patch) | |
tree | ee81ab66cfa382d66bc085d31804efb8c1059af2 /plugin/plugin_test.go | |
parent | 84ebbbc7225a8d7eb5e00c0c525f7e12932a9fe4 (diff) | |
download | coredns-c6febe6250361eee580dbb8a601a444f23ed7ac2.tar.gz coredns-c6febe6250361eee580dbb8a601a444f23ed7ac2.tar.zst coredns-c6febe6250361eee580dbb8a601a444f23ed7ac2.zip |
Add pkg/fall for Fallthrough (#1355)
* Add pkg/fall for Fallthrough
Move this into it's own package to facilitate tests. Important bug
was fixed: make the names fully qualified.
Add fall package to hosts, reverse, etcd, and fix kubernetes and any
tests. The k8s tests are still as-is, might need a future cleanup.
Diffstat (limited to 'plugin/plugin_test.go')
-rw-r--r-- | plugin/plugin_test.go | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/plugin/plugin_test.go b/plugin/plugin_test.go deleted file mode 100644 index 80c253843..000000000 --- a/plugin/plugin_test.go +++ /dev/null @@ -1,21 +0,0 @@ -package plugin - -import "testing" - -func TestFallthrough(t *testing.T) { - if Fallthrough(nil, "foo.com.") { - t.Errorf("Expected false, got true for nil fallthrough") - } - - if !Fallthrough(&[]string{}, "foo.net.") { - t.Errorf("Expected true, got false for all zone fallthrough") - } - - if Fallthrough(&[]string{"foo.com", "bar.com"}, "foo.net") { - t.Errorf("Expected false, got true for non-matching fallthrough zone") - } - - if !Fallthrough(&[]string{"foo.com.", "bar.com."}, "bar.com.") { - t.Errorf("Expected true, got false for matching fallthrough zone") - } -} |