Return error for empty sysctl names

This commit is contained in:
Dr. Stefan Schimanski
2016-09-30 11:07:04 +02:00
parent e258d0bc4b
commit e6acc08d96
2 changed files with 9 additions and 1 deletions

View File

@@ -508,6 +508,14 @@ func TestSysctlsFromPodAnnotation(t *testing.T) {
annotation: "foo.bar",
expectErr: true,
},
{
annotation: "=123",
expectErr: true,
},
{
annotation: "foo.bar=",
expectValue: []Sysctl{{Name: "foo.bar", Value: ""}},
},
{
annotation: "foo.bar=42",
expectValue: []Sysctl{{Name: "foo.bar", Value: "42"}},