aboutsummaryrefslogtreecommitdiff
path: root/plugin/kubernetes/handler_test.go
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2018-12-08 23:40:07 +0000
committerGravatar Yong Tang <yong.tang.github@outlook.com> 2018-12-08 15:40:07 -0800
commit95546dfdfeab92149a99734120386ff994bfd639 (patch)
tree8a5faa9d9d149a685b3a7625bc63006f22fa2f6a /plugin/kubernetes/handler_test.go
parent0f7d95b1e7466512c1bee194d3601d4852a966e9 (diff)
downloadcoredns-95546dfdfeab92149a99734120386ff994bfd639.tar.gz
coredns-95546dfdfeab92149a99734120386ff994bfd639.tar.zst
coredns-95546dfdfeab92149a99734120386ff994bfd639.zip
plugin/kubernetes: smaller map (#2383)
* plugin/kubernetes: smaller map to continue with a theme: the map[string]bool can be reduced to map[string]struct{} to reduce a tiny amount of memory. Signed-off-by: Miek Gieben <miek@miek.nl> * fix tests Signed-off-by: Miek Gieben <miek@miek.nl>
Diffstat (limited to 'plugin/kubernetes/handler_test.go')
-rw-r--r--plugin/kubernetes/handler_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugin/kubernetes/handler_test.go b/plugin/kubernetes/handler_test.go
index 3efdbe031..aa9b35e1a 100644
--- a/plugin/kubernetes/handler_test.go
+++ b/plugin/kubernetes/handler_test.go
@@ -348,7 +348,7 @@ func TestServeDNS(t *testing.T) {
k := New([]string{"cluster.local."})
k.APIConn = &APIConnServeTest{}
k.Next = test.NextHandler(dns.RcodeSuccess, nil)
- k.Namespaces = map[string]bool{"testns": true}
+ k.Namespaces = map[string]struct{}{"testns": struct{}{}}
ctx := context.TODO()
for i, tc := range dnsTestCases {
@@ -395,7 +395,7 @@ func TestNotSyncedServeDNS(t *testing.T) {
notSynced: true,
}
k.Next = test.NextHandler(dns.RcodeSuccess, nil)
- k.Namespaces = map[string]bool{"testns": true}
+ k.Namespaces = map[string]struct{}{"testns": struct{}{}}
ctx := context.TODO()
for i, tc := range notSyncedTestCases {