Updating tests with SessionSCfg() function

This commit is contained in:
DanB
2018-01-04 17:47:51 +01:00
parent e55009bc60
commit 58da425ac0
2 changed files with 4 additions and 3 deletions

View File

@@ -463,8 +463,9 @@ func TestCgrCfgJSONDefaultsSMGenericCfg(t *testing.T) {
SessionTTL: 0 * time.Second,
SessionIndexes: utils.StringMap{},
}
if !reflect.DeepEqual(cgrCfg.SessionSCfg, eSessionSCfg) {
t.Errorf("received: %+v, expecting: %+v", cgrCfg.SessionSCfg, eSessionSCfg)
if !reflect.DeepEqual(eSessionSCfg, cgrCfg.sessionSCfg) {
t.Errorf("expecting: %s, received: %s",
utils.ToJSON(eSessionSCfg), utils.ToJSON(cgrCfg.sessionSCfg))
}
}

View File

@@ -29,7 +29,7 @@ var smgCfg *config.CGRConfig
func init() {
smgCfg, _ = config.NewDefaultCGRConfig()
smgCfg.SMGConfig.SessionIndexes = utils.StringMap{"Tenant": true,
smgCfg.SessionSCfg().SessionIndexes = utils.StringMap{"Tenant": true,
"Account": true, "Extra3": true, "Extra4": true}
}