Update integration test and remove RPCConns from precache list

This commit is contained in:
TeoV
2019-12-04 03:08:34 -05:00
parent 7b9de8fd73
commit 3c85747fd4
5 changed files with 11 additions and 9 deletions

View File

@@ -294,6 +294,10 @@ func testPrecacheGetCacheStatsAfterRestart(t *testing.T) {
Items: 0,
Groups: 0,
},
utils.CacheRPCConnections: {
Items: 0,
Groups: 0,
},
}
if err := precacheRPC.Call(utils.CacheSv1GetCacheStats, args, &reply); err != nil {
t.Error(err.Error())

View File

@@ -465,13 +465,8 @@ func TestCGRConfigReloadERs(t *testing.T) {
&FCTemplate{Tag: utils.Usage, FieldId: utils.Usage, Type: utils.META_COMPOSED, Value: NewRSRParsersMustCompile("~*req.13", true, utils.INFIELD_SEP), Mandatory: true},
}
expAttr := &ERsCfg{
Enabled: true,
SessionSConns: []*RemoteHost{
&RemoteHost{
Address: "127.0.0.1:2012",
Transport: utils.MetaJSON,
},
},
Enabled: true,
SessionSConns: []string{utils.MetaLocalHost},
Readers: []*EventReaderCfg{
&EventReaderCfg{
ID: utils.META_DEFAULT,

View File

@@ -410,7 +410,7 @@ func (cfg *CGRConfig) checkConfigSanity() error {
// DataDB sanity checks
if cfg.dataDbCfg.DataDbType == utils.INTERNAL {
for key, config := range cfg.cacheCfg {
if key == utils.CacheDiameterMessages || key == utils.CacheClosedSessions {
if key == utils.CacheDiameterMessages || key == utils.CacheClosedSessions || key == utils.CacheRPCConnections {
if config.Limit == 0 {
return fmt.Errorf("<%s> %s needs to be != 0 when DataBD is *internal, found 0.", utils.CacheS, key)
}

View File

@@ -56,7 +56,6 @@ var precachedPartitions = utils.StringMap{
utils.CacheChargerProfiles: true,
utils.CacheDispatcherProfiles: true,
utils.CacheDispatcherHosts: true,
utils.CacheRPCConnections: true,
utils.CacheAttributeFilterIndexes: true,
utils.CacheResourceFilterIndexes: true,

View File

@@ -610,5 +610,9 @@ func GetDefaultEmptyCacheStats() map[string]*ltcache.CacheStats {
Items: 0,
Groups: 0,
},
utils.CacheRPCConnections: {
Items: 0,
Groups: 0,
},
}
}