mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-20 06:38:45 +05:00
Clearing Cache when removing indexes
This commit is contained in:
committed by
Dan Christian Bogos
parent
18d2841670
commit
983f74f8a8
@@ -342,6 +342,8 @@ func TestThresholdsmatchingThresholdsForEvent(t *testing.T) {
|
||||
},
|
||||
},
|
||||
}
|
||||
dmTH.SetFilter(context.TODO(), fltrTh2, true)
|
||||
dmTH.SetFilter(context.TODO(), fltrTh3, true)
|
||||
for _, th := range tPrfls {
|
||||
if err = dmTH.SetThresholdProfile(th, true); err != nil {
|
||||
t.Errorf("Error: %+v", err)
|
||||
|
||||
@@ -154,6 +154,7 @@ func TestFilterMatchingItemIDsForEvent2(t *testing.T) {
|
||||
Tenant: config.CgrConfig().GeneralCfg().DefaultTenant,
|
||||
ID: "stringFilter",
|
||||
Rules: stringFilter}
|
||||
dmMatch.SetFilter(context.TODO(), attribStringF, true)
|
||||
|
||||
x, err = NewFilterRule(utils.MetaPrefix, "~*req.CallCost.Field", []string{"profile"})
|
||||
if err != nil {
|
||||
@@ -164,6 +165,7 @@ func TestFilterMatchingItemIDsForEvent2(t *testing.T) {
|
||||
Tenant: config.CgrConfig().GeneralCfg().DefaultTenant,
|
||||
ID: "prefFilter",
|
||||
Rules: prefixFilter}
|
||||
dmMatch.SetFilter(context.TODO(), attribPrefF, true)
|
||||
|
||||
x, err = NewFilterRule(utils.MetaGreaterOrEqual, "~*req.Weight", []string{"200.00"})
|
||||
if err != nil {
|
||||
@@ -173,8 +175,9 @@ func TestFilterMatchingItemIDsForEvent2(t *testing.T) {
|
||||
attribDefaultF := &Filter{
|
||||
Tenant: config.CgrConfig().GeneralCfg().DefaultTenant,
|
||||
ID: "defaultFilter",
|
||||
Rules: defaultFilter}
|
||||
|
||||
Rules: defaultFilter,
|
||||
}
|
||||
dmMatch.SetFilter(context.TODO(), attribDefaultF, true)
|
||||
|
||||
tnt := config.CgrConfig().GeneralCfg().DefaultTenant
|
||||
if err = addItemToFilterIndex(context.TODO(), dmMatch, utils.CacheAttributeFilterIndexes,
|
||||
|
||||
Reference in New Issue
Block a user