Signed-off-by: Renaud Gaubert <renaud.gaubert@gmail.com>
| ... | ... |
@@ -259,6 +259,20 @@ func TestValidateConfigurationErrors(t *testing.T) {
|
| 259 | 259 |
}, |
| 260 | 260 |
}, |
| 261 | 261 |
}, |
| 262 |
+ {
|
|
| 263 |
+ config: &Config{
|
|
| 264 |
+ CommonConfig: CommonConfig{
|
|
| 265 |
+ NodeGenericResources: []string{"foo"},
|
|
| 266 |
+ }, |
|
| 267 |
+ }, |
|
| 268 |
+ }, |
|
| 269 |
+ {
|
|
| 270 |
+ config: &Config{
|
|
| 271 |
+ CommonConfig: CommonConfig{
|
|
| 272 |
+ NodeGenericResources: []string{"foo=bar", "foo=1"},
|
|
| 273 |
+ }, |
|
| 274 |
+ }, |
|
| 275 |
+ }, |
|
| 262 | 276 |
} |
| 263 | 277 |
for _, tc := range testCases {
|
| 264 | 278 |
err := Validate(tc.config) |
| ... | ... |
@@ -316,6 +330,20 @@ func TestValidateConfiguration(t *testing.T) {
|
| 316 | 316 |
}, |
| 317 | 317 |
}, |
| 318 | 318 |
}, |
| 319 |
+ {
|
|
| 320 |
+ config: &Config{
|
|
| 321 |
+ CommonConfig: CommonConfig{
|
|
| 322 |
+ NodeGenericResources: []string{"foo=bar", "foo=baz"},
|
|
| 323 |
+ }, |
|
| 324 |
+ }, |
|
| 325 |
+ }, |
|
| 326 |
+ {
|
|
| 327 |
+ config: &Config{
|
|
| 328 |
+ CommonConfig: CommonConfig{
|
|
| 329 |
+ NodeGenericResources: []string{"foo=1"},
|
|
| 330 |
+ }, |
|
| 331 |
+ }, |
|
| 332 |
+ }, |
|
| 319 | 333 |
} |
| 320 | 334 |
for _, tc := range testCases {
|
| 321 | 335 |
err := Validate(tc.config) |