plugin/kubernetes: Allow only one k8s section (#1497)

* allow only one k8s section

* add test
This commit is contained in:
Chris O'Haver 2018-02-07 11:31:08 -05:00 committed by Miek Gieben
parent f636930c5c
commit 82854bf098
2 changed files with 18 additions and 1 deletions

View file

@ -382,6 +382,20 @@ func TestKubernetesParse(t *testing.T) {
fall.Zero,
nil,
},
// More than one Kubernetes not allowed
{
`kubernetes coredns.local
kubernetes cluster.local`,
true,
"only one kubernetes section allowed per server block",
-1,
0,
defaultResyncPeriod,
"",
podModeDisabled,
fall.Zero,
nil,
},
}
for i, test := range tests {