aboutsummaryrefslogtreecommitdiff
path: root/plugin/kubernetes/setup_test.go
diff options
context:
space:
mode:
authorGravatar Chris O'Haver <cohaver@infoblox.com> 2018-02-14 15:11:26 -0500
committerGravatar Miek Gieben <miek@miek.nl> 2018-02-14 21:11:26 +0100
commit71ee323651ffed5d09aa22ea8d17eefbac2f6d08 (patch)
treec9fb894a5de2dc34dd14b66057856244d8b28203 /plugin/kubernetes/setup_test.go
parentee8084a08f8cfcd4357ae2ad0b6dff51ca322d3a (diff)
downloadcoredns-71ee323651ffed5d09aa22ea8d17eefbac2f6d08.tar.gz
coredns-71ee323651ffed5d09aa22ea8d17eefbac2f6d08.tar.zst
coredns-71ee323651ffed5d09aa22ea8d17eefbac2f6d08.zip
plugin/kubernetes: Add upstream @self and loop count (#1484)
* add upstream @self and loop count * 1st round of feedback * allow argless upstream * update test * readmes * feedback
Diffstat (limited to 'plugin/kubernetes/setup_test.go')
-rw-r--r--plugin/kubernetes/setup_test.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugin/kubernetes/setup_test.go b/plugin/kubernetes/setup_test.go
index 4d9124332..0b4347ff7 100644
--- a/plugin/kubernetes/setup_test.go
+++ b/plugin/kubernetes/setup_test.go
@@ -7,6 +7,7 @@ import (
"github.com/coredns/coredns/plugin/pkg/fall"
+ "github.com/coredns/coredns/plugin/proxy"
"github.com/mholt/caddy"
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
)
@@ -463,7 +464,10 @@ kubernetes cluster.local`,
t.Errorf("Test %d: Expected kubernetes controller to be initialized with fallthrough '%v'. Instead found fallthrough '%v' for input '%s'", i, test.expectedFallthrough, k8sController.Fall, test.input)
}
// upstream
- foundUpstreams := k8sController.Proxy.Upstreams
+ var foundUpstreams *[]proxy.Upstream
+ if k8sController.Upstream.Forward != nil {
+ foundUpstreams = k8sController.Upstream.Forward.Upstreams
+ }
if test.expectedUpstreams == nil {
if foundUpstreams != nil {
t.Errorf("Test %d: Expected kubernetes controller to not be initialized with upstreams for input '%s'", i, test.input)