mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
fixes for cache movement
This commit is contained in:
@@ -22,7 +22,6 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/cgrates/cgrates/cache2go"
|
||||
"github.com/cgrates/cgrates/config"
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
@@ -78,16 +77,16 @@ RP_ANY,DR_ANY_1CNT,*any,10`
|
||||
ratingDbAuth.CacheRatingAll()
|
||||
acntDbAuth.CacheAccountingAll()
|
||||
|
||||
if cachedDests := cache2go.CountEntries(utils.DESTINATION_PREFIX); cachedDests != 1 {
|
||||
if cachedDests := engine.CacheCountEntries(utils.DESTINATION_PREFIX); cachedDests != 1 {
|
||||
t.Error("Wrong number of cached destinations found", cachedDests)
|
||||
}
|
||||
if cachedRPlans := cache2go.CountEntries(utils.RATING_PLAN_PREFIX); cachedRPlans != 2 {
|
||||
if cachedRPlans := engine.CacheCountEntries(utils.RATING_PLAN_PREFIX); cachedRPlans != 2 {
|
||||
t.Error("Wrong number of cached rating plans found", cachedRPlans)
|
||||
}
|
||||
if cachedRProfiles := cache2go.CountEntries(utils.RATING_PROFILE_PREFIX); cachedRProfiles != 3 {
|
||||
if cachedRProfiles := engine.CacheCountEntries(utils.RATING_PROFILE_PREFIX); cachedRProfiles != 3 {
|
||||
t.Error("Wrong number of cached rating profiles found", cachedRProfiles)
|
||||
}
|
||||
if cachedActions := cache2go.CountEntries(utils.ACTION_PREFIX); cachedActions != 1 {
|
||||
if cachedActions := engine.CacheCountEntries(utils.ACTION_PREFIX); cachedActions != 1 {
|
||||
t.Error("Wrong number of cached actions found", cachedActions)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@ package general_tests
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/cgrates/cgrates/cache2go"
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
@@ -78,10 +77,10 @@ RP_SMS1,DR_SMS_1,ALWAYS,10`
|
||||
ratingDb.CacheRatingAll()
|
||||
acntDb.CacheAccountingAll()
|
||||
|
||||
if cachedRPlans := cache2go.CountEntries(utils.RATING_PLAN_PREFIX); cachedRPlans != 3 {
|
||||
if cachedRPlans := engine.CacheCountEntries(utils.RATING_PLAN_PREFIX); cachedRPlans != 3 {
|
||||
t.Error("Wrong number of cached rating plans found", cachedRPlans)
|
||||
}
|
||||
if cachedRProfiles := cache2go.CountEntries(utils.RATING_PROFILE_PREFIX); cachedRProfiles != 3 {
|
||||
if cachedRProfiles := engine.CacheCountEntries(utils.RATING_PROFILE_PREFIX); cachedRProfiles != 3 {
|
||||
t.Error("Wrong number of cached rating profiles found", cachedRProfiles)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/cgrates/cgrates/cache2go"
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
@@ -65,10 +64,10 @@ RP_DATA1,DR_DATA_2,TM2,10`
|
||||
ratingDb.CacheRatingAll()
|
||||
acntDb.CacheAccountingAll()
|
||||
|
||||
if cachedRPlans := cache2go.CountEntries(utils.RATING_PLAN_PREFIX); cachedRPlans != 1 {
|
||||
if cachedRPlans := engine.CacheCountEntries(utils.RATING_PLAN_PREFIX); cachedRPlans != 1 {
|
||||
t.Error("Wrong number of cached rating plans found", cachedRPlans)
|
||||
}
|
||||
if cachedRProfiles := cache2go.CountEntries(utils.RATING_PROFILE_PREFIX); cachedRProfiles != 1 {
|
||||
if cachedRProfiles := engine.CacheCountEntries(utils.RATING_PROFILE_PREFIX); cachedRProfiles != 1 {
|
||||
t.Error("Wrong number of cached rating profiles found", cachedRProfiles)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/cgrates/cgrates/cache2go"
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
"github.com/cgrates/cgrates/scheduler"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
@@ -114,16 +113,16 @@ TOPUP10_AT,TOPUP10_AC1,ASAP,10`
|
||||
ratingDb.CacheRatingAll()
|
||||
acntDb.CacheAccountingAll()
|
||||
|
||||
if cachedDests := cache2go.CountEntries(utils.DESTINATION_PREFIX); cachedDests != 2 {
|
||||
if cachedDests := engine.CacheCountEntries(utils.DESTINATION_PREFIX); cachedDests != 2 {
|
||||
t.Error("Wrong number of cached destinations found", cachedDests)
|
||||
}
|
||||
if cachedRPlans := cache2go.CountEntries(utils.RATING_PLAN_PREFIX); cachedRPlans != 2 {
|
||||
if cachedRPlans := engine.CacheCountEntries(utils.RATING_PLAN_PREFIX); cachedRPlans != 2 {
|
||||
t.Error("Wrong number of cached rating plans found", cachedRPlans)
|
||||
}
|
||||
if cachedRProfiles := cache2go.CountEntries(utils.RATING_PROFILE_PREFIX); cachedRProfiles != 2 {
|
||||
if cachedRProfiles := engine.CacheCountEntries(utils.RATING_PROFILE_PREFIX); cachedRProfiles != 2 {
|
||||
t.Error("Wrong number of cached rating profiles found", cachedRProfiles)
|
||||
}
|
||||
if cachedActions := cache2go.CountEntries(utils.ACTION_PREFIX); cachedActions != 2 {
|
||||
if cachedActions := engine.CacheCountEntries(utils.ACTION_PREFIX); cachedActions != 2 {
|
||||
t.Error("Wrong number of cached actions found", cachedActions)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/cgrates/cgrates/cache2go"
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
"github.com/cgrates/cgrates/scheduler"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
@@ -113,16 +112,16 @@ TOPUP10_AT,TOPUP10_AC1,ASAP,10`
|
||||
ratingDb2.CacheRatingAll()
|
||||
acntDb2.CacheAccountingAll()
|
||||
|
||||
if cachedDests := cache2go.CountEntries(utils.DESTINATION_PREFIX); cachedDests != 2 {
|
||||
if cachedDests := engine.CacheCountEntries(utils.DESTINATION_PREFIX); cachedDests != 2 {
|
||||
t.Error("Wrong number of cached destinations found", cachedDests)
|
||||
}
|
||||
if cachedRPlans := cache2go.CountEntries(utils.RATING_PLAN_PREFIX); cachedRPlans != 2 {
|
||||
if cachedRPlans := engine.CacheCountEntries(utils.RATING_PLAN_PREFIX); cachedRPlans != 2 {
|
||||
t.Error("Wrong number of cached rating plans found", cachedRPlans)
|
||||
}
|
||||
if cachedRProfiles := cache2go.CountEntries(utils.RATING_PROFILE_PREFIX); cachedRProfiles != 2 {
|
||||
if cachedRProfiles := engine.CacheCountEntries(utils.RATING_PROFILE_PREFIX); cachedRProfiles != 2 {
|
||||
t.Error("Wrong number of cached rating profiles found", cachedRProfiles)
|
||||
}
|
||||
if cachedActions := cache2go.CountEntries(utils.ACTION_PREFIX); cachedActions != 2 {
|
||||
if cachedActions := engine.CacheCountEntries(utils.ACTION_PREFIX); cachedActions != 2 {
|
||||
t.Error("Wrong number of cached actions found", cachedActions)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/cgrates/cgrates/cache2go"
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
"github.com/cgrates/cgrates/scheduler"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
@@ -111,16 +110,16 @@ RP_UK,DR_UK_Mobile_BIG5,ALWAYS,10`
|
||||
ratingDb3.CacheRatingAll()
|
||||
acntDb3.CacheAccountingAll()
|
||||
|
||||
if cachedDests := cache2go.CountEntries(utils.DESTINATION_PREFIX); cachedDests != 2 {
|
||||
if cachedDests := engine.CacheCountEntries(utils.DESTINATION_PREFIX); cachedDests != 2 {
|
||||
t.Error("Wrong number of cached destinations found", cachedDests)
|
||||
}
|
||||
if cachedRPlans := cache2go.CountEntries(utils.RATING_PLAN_PREFIX); cachedRPlans != 2 {
|
||||
if cachedRPlans := engine.CacheCountEntries(utils.RATING_PLAN_PREFIX); cachedRPlans != 2 {
|
||||
t.Error("Wrong number of cached rating plans found", cachedRPlans)
|
||||
}
|
||||
if cachedRProfiles := cache2go.CountEntries(utils.RATING_PROFILE_PREFIX); cachedRProfiles != 2 {
|
||||
if cachedRProfiles := engine.CacheCountEntries(utils.RATING_PROFILE_PREFIX); cachedRProfiles != 2 {
|
||||
t.Error("Wrong number of cached rating profiles found", cachedRProfiles)
|
||||
}
|
||||
if cachedActions := cache2go.CountEntries(utils.ACTION_PREFIX); cachedActions != 1 {
|
||||
if cachedActions := engine.CacheCountEntries(utils.ACTION_PREFIX); cachedActions != 1 {
|
||||
t.Error("Wrong number of cached actions found", cachedActions)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/cgrates/cgrates/cache2go"
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
@@ -61,10 +60,10 @@ func TestSMSLoadCsvTpSmsChrg1(t *testing.T) {
|
||||
ratingDb.CacheRatingAll()
|
||||
acntDb.CacheAccountingAll()
|
||||
|
||||
if cachedRPlans := cache2go.CountEntries(utils.RATING_PLAN_PREFIX); cachedRPlans != 1 {
|
||||
if cachedRPlans := engine.CacheCountEntries(utils.RATING_PLAN_PREFIX); cachedRPlans != 1 {
|
||||
t.Error("Wrong number of cached rating plans found", cachedRPlans)
|
||||
}
|
||||
if cachedRProfiles := cache2go.CountEntries(utils.RATING_PROFILE_PREFIX); cachedRProfiles != 1 {
|
||||
if cachedRProfiles := engine.CacheCountEntries(utils.RATING_PROFILE_PREFIX); cachedRProfiles != 1 {
|
||||
t.Error("Wrong number of cached rating profiles found", cachedRProfiles)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user