Threshold and threshold_profiles in cache settings

This commit is contained in:
DanB
2017-10-13 21:05:14 +02:00
parent 6caa7225a2
commit 021807b732
2 changed files with 10 additions and 0 deletions

View File

@@ -127,6 +127,12 @@ func TestCacheJsonCfg(t *testing.T) {
utils.CacheStatQueues: &CacheParamJsonCfg{Limit: utils.IntPointer(-1),
Ttl: utils.StringPointer("1m"), Static_ttl: utils.BoolPointer(false),
Precache: utils.BoolPointer(false)},
utils.CacheThresholdProfiles: &CacheParamJsonCfg{Limit: utils.IntPointer(-1),
Ttl: utils.StringPointer(""), Static_ttl: utils.BoolPointer(false),
Precache: utils.BoolPointer(false)},
utils.CacheThresholds: &CacheParamJsonCfg{Limit: utils.IntPointer(-1),
Ttl: utils.StringPointer(""), Static_ttl: utils.BoolPointer(false),
Precache: utils.BoolPointer(false)},
}
if gCfg, err := dfCgrJsonCfg.CacheJsonCfg(); err != nil {

View File

@@ -450,6 +450,10 @@ func TestCgrCfgJSONDefaultsCacheCFG(t *testing.T) {
TTL: time.Duration(1 * time.Minute), StaticTTL: false, Precache: false},
utils.CacheStatQueues: &CacheParamConfig{Limit: -1,
TTL: time.Duration(1 * time.Minute), StaticTTL: false, Precache: false},
utils.CacheThresholdProfiles: &CacheParamConfig{Limit: -1,
TTL: time.Duration(0), StaticTTL: false, Precache: false},
utils.CacheThresholds: &CacheParamConfig{Limit: -1,
TTL: time.Duration(0), StaticTTL: false, Precache: false},
}
if !reflect.DeepEqual(eCacheCfg, cgrCfg.CacheConfig) {
t.Errorf("received: %s, \nexpecting: %s", utils.ToJSON(eCacheCfg), utils.ToJSON(cgrCfg.CacheConfig))