diff options
author | 2017-08-07 07:09:32 -0700 | |
---|---|---|
committer | 2017-08-07 07:09:32 -0700 | |
commit | 760e66706381ada5c4a589650175d07e8aeb09f0 (patch) | |
tree | ce0472143c20801a3637fa1ae774b4a8d1e2bb91 /middleware/kubernetes/handler_test.go | |
parent | 050eccd69e2381fa865b5c527618111ab7c7d21d (diff) | |
download | coredns-760e66706381ada5c4a589650175d07e8aeb09f0.tar.gz coredns-760e66706381ada5c4a589650175d07e8aeb09f0.tar.zst coredns-760e66706381ada5c4a589650175d07e8aeb09f0.zip |
middleware/kubernetes: autopath in sub package (#848)
Put the autopath stuff in a separate sub package. Tests are still
included in the main kubernetes directory.
Next steps (after this is merged), is pulling the autopath handling
into the subpackage and fixing the tests.
Diffstat (limited to 'middleware/kubernetes/handler_test.go')
-rw-r--r-- | middleware/kubernetes/handler_test.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/middleware/kubernetes/handler_test.go b/middleware/kubernetes/handler_test.go index 04d64722f..dc6b62923 100644 --- a/middleware/kubernetes/handler_test.go +++ b/middleware/kubernetes/handler_test.go @@ -5,6 +5,7 @@ import ( "sort" "testing" + "github.com/coredns/coredns/middleware/kubernetes/autopath" "github.com/coredns/coredns/middleware/pkg/dnsrecorder" "github.com/coredns/coredns/middleware/test" @@ -267,8 +268,8 @@ func TestServeDNS(t *testing.T) { k.ReverseCidrs = []net.IPNet{*cidr} k.Federations = []Federation{{name: "fed", zone: "federal.test."}} k.APIConn = &APIConnServeTest{} - k.AutoPath.Enabled = true - k.AutoPath.HostSearchPath = []string{"hostdom.test"} + k.autoPath = new(autopath.AutoPath) + k.autoPath.HostSearchPath = []string{"hostdom.test"} k.interfaceAddrsFunc = localPodIP k.Next = testHandler(nextMWMap) @@ -288,11 +289,11 @@ func TestServeDNS(t *testing.T) { runServeDNSTests(ctx, t, podModeVerifiedCases, k) // Set ndots to 2 for the ndots test cases - k.AutoPath.NDots = 2 + k.autoPath.NDots = 2 runServeDNSTests(ctx, t, autopath2NDotsCases, k) - k.AutoPath.NDots = defautNdots + k.autoPath.NDots = defautNdots // Disable the NXDOMAIN override (enabled by default) - k.OnNXDOMAIN = dns.RcodeNameError + k.autoPath.OnNXDOMAIN = dns.RcodeNameError runServeDNSTests(ctx, t, autopathCases, k) runServeDNSTests(ctx, t, autopathBareSearchExpectNameErr, k) |