Added NodeGenericResource config tests
Signed-off-by: Renaud Gaubert <renaud.gaubert@gmail.com> Upstream-commit: 734346a37e0cd5d2576f759d302beed5033ff14e Component: engine
This commit is contained in:
@ -259,6 +259,20 @@ func TestValidateConfigurationErrors(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
config: &Config{
|
||||
CommonConfig: CommonConfig{
|
||||
NodeGenericResources: []string{"foo"},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
config: &Config{
|
||||
CommonConfig: CommonConfig{
|
||||
NodeGenericResources: []string{"foo=bar", "foo=1"},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
for _, tc := range testCases {
|
||||
err := Validate(tc.config)
|
||||
@ -316,6 +330,20 @@ func TestValidateConfiguration(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
config: &Config{
|
||||
CommonConfig: CommonConfig{
|
||||
NodeGenericResources: []string{"foo=bar", "foo=baz"},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
config: &Config{
|
||||
CommonConfig: CommonConfig{
|
||||
NodeGenericResources: []string{"foo=1"},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
for _, tc := range testCases {
|
||||
err := Validate(tc.config)
|
||||
|
||||
Reference in New Issue
Block a user