mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-22 07:38:45 +05:00
Update integration test and remove RPCConns from precache list
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -610,5 +610,9 @@ func GetDefaultEmptyCacheStats() map[string]*ltcache.CacheStats {
|
||||
Items: 0,
|
||||
Groups: 0,
|
||||
},
|
||||
utils.CacheRPCConnections: {
|
||||
Items: 0,
|
||||
Groups: 0,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user