diff options
author | 2018-02-14 15:11:26 -0500 | |
---|---|---|
committer | 2018-02-14 21:11:26 +0100 | |
commit | 71ee323651ffed5d09aa22ea8d17eefbac2f6d08 (patch) | |
tree | c9fb894a5de2dc34dd14b66057856244d8b28203 /plugin/kubernetes/setup_test.go | |
parent | ee8084a08f8cfcd4357ae2ad0b6dff51ca322d3a (diff) | |
download | coredns-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.go | 6 |
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) |