diff --git a/config/configsanity_test.go b/config/configsanity_test.go index 765e2fc27..e30a1927a 100644 --- a/config/configsanity_test.go +++ b/config/configsanity_test.go @@ -853,6 +853,18 @@ func TestConfigSanityScheduler(t *testing.T) { t.Errorf("Expecting: %+q received: %+q", expected, err) } cfg.schedulerCfg.ThreshSConns = []string{} + + cfg.schedulerCfg.StatSConns = []string{utils.MetaInternal} + expected = " not enabled but requested by component." + if err := cfg.checkConfigSanity(); err == nil || err.Error() != expected { + t.Errorf("Expecting: %+q received: %+q", expected, err) + } + cfg.schedulerCfg.StatSConns = []string{"test"} + expected = " connection with id: not defined" + if err := cfg.checkConfigSanity(); err == nil || err.Error() != expected { + t.Errorf("Expecting: %+q received: %+q", expected, err) + } + cfg.schedulerCfg.StatSConns = []string{} } func TestConfigSanityEventReader(t *testing.T) {