mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-16 21:59:53 +05:00
Add confil filters tests
This commit is contained in:
committed by
Dan Christian Bogos
parent
73451d4f1a
commit
09d517d984
@@ -688,6 +688,17 @@ func TestDfUserServJsonCfg(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestDfFilterSJsonCfg(t *testing.T) {
|
||||
eCfg := &FilterSJsonCfg{
|
||||
Stats_conns: &[]*HaPoolJsonCfg{},
|
||||
}
|
||||
if cfg, err := dfCgrJsonCfg.FilterSJsonCfg(); err != nil {
|
||||
t.Error(err)
|
||||
} else if !reflect.DeepEqual(eCfg, cfg) {
|
||||
t.Errorf("Expected: %s, received: %s", utils.ToJSON(eCfg), utils.ToJSON(cfg))
|
||||
}
|
||||
}
|
||||
|
||||
func TestDfResourceLimiterSJsonCfg(t *testing.T) {
|
||||
eCfg := &ResourceSJsonCfg{
|
||||
Enabled: utils.BoolPointer(false),
|
||||
|
||||
@@ -269,7 +269,7 @@ func TestCgrCfgJSONDefaultsStorDB(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestCgrCfgJSONDefaultsRALs(t *testing.T) {
|
||||
|
||||
//asd
|
||||
eHaPoolcfg := []*HaPoolConfig{}
|
||||
|
||||
if cgrCfg.RALsEnabled != false {
|
||||
@@ -580,6 +580,15 @@ func TestCgrCfgJSONDefaultsUserS(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestCgrCfgJSONDefaultFiltersCfg(t *testing.T) {
|
||||
eFiltersCfg := &FilterSCfg{
|
||||
StatSConns: []*HaPoolConfig{},
|
||||
}
|
||||
if !reflect.DeepEqual(cgrCfg.filterSCfg, eFiltersCfg) {
|
||||
t.Errorf("received: %+v, expecting: %+v", cgrCfg.filterSCfg, eFiltersCfg)
|
||||
}
|
||||
}
|
||||
|
||||
func TestCgrCfgJSONDefaultsResLimCfg(t *testing.T) {
|
||||
eResLiCfg := &ResourceSConfig{
|
||||
Enabled: false,
|
||||
|
||||
Reference in New Issue
Block a user