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>
This commit is contained in:
parent
0f7d95b1e7
commit
95546dfdfe
4 changed files with 7 additions and 7 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue