mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Covered configsanity_test.go to 100%
This commit is contained in:
committed by
Dan Christian Bogos
parent
7bb9a04e27
commit
8569cdc2a4
@@ -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 = "<Stats> not enabled but requested by <SchedulerS> component."
|
||||
if err := cfg.checkConfigSanity(); err == nil || err.Error() != expected {
|
||||
t.Errorf("Expecting: %+q received: %+q", expected, err)
|
||||
}
|
||||
cfg.schedulerCfg.StatSConns = []string{"test"}
|
||||
expected = "<SchedulerS> connection with id: <test> 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) {
|
||||
|
||||
Reference in New Issue
Block a user