Coverage tests in engine

This commit is contained in:
arberkatellari
2022-12-23 10:56:55 -05:00
committed by Dan Christian Bogos
parent 7b44cd164f
commit 56ceed33cc
3 changed files with 1479 additions and 149 deletions

View File

@@ -330,37 +330,6 @@ func TestV1GetItemIDsErr(t *testing.T) {
}
// unfinished OnEvicted
// func TestNewCacheS(t *testing.T) {
// Cache.Clear(nil)
// args := &utils.ArgCacheReplicateSet{
// CacheID: utils.CacheAccounts,
// ItemID: "itemID",
// Value: &utils.CachedRPCResponse{Result: "reply", Error: nil},
// GroupIDs: []string{"groupId", "groupId"},
// }
// cfg := config.NewDefaultCGRConfig()
// cfg.CacheCfg().ReplicationConns = []string{utils.ConcatenatedKey(utils.MetaInternal, utils.ReplicationConnsCfg)}
// cfg.CacheCfg().Partitions = map[string]*config.CacheParamCfg{
// args.CacheID: {
// Replicate: true,
// },
// }
// db := NewInternalDB(nil, nil, cfg.DataDbCfg().Items)
// dm := NewDataManager(db, cfg.CacheCfg(), nil)
// connMgr := NewConnManager(cfg)
// stopchan := make(chan struct{}, 1)
// close(stopchan)
// caps := NewCaps(1, utils.MetaBusy)
// sts := NewCapsStats(cfg.CoreSCfg().CapsStatsInterval, caps, stopchan)
// cacheS := NewCacheS(cfg, dm, connMgr, sts)
// t.Error(cacheS)
// }
func TestCacheSGetWithRemoteQueryErr(t *testing.T) {
tmp := Cache
defer func() {

View File

@@ -1586,8 +1586,10 @@ func TestDMSetAccountupdatedIndexesErr(t *testing.T) {
func TestDMSetAccountReplicateTrue(t *testing.T) {
tmp := Cache
cfgtmp := config.CgrConfig()
defer func() {
Cache = tmp
config.SetCgrConfig(cfgtmp)
}()
cfg := config.NewDefaultCGRConfig()

File diff suppressed because it is too large Load Diff