diff --git a/general_tests/auth_test.go b/general_tests/auth_test.go index 81a683305..ab6a60111 100644 --- a/general_tests/auth_test.go +++ b/general_tests/auth_test.go @@ -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) } } diff --git a/general_tests/costs1_test.go b/general_tests/costs1_test.go index 2d4a4ec94..c10afcaca 100644 --- a/general_tests/costs1_test.go +++ b/general_tests/costs1_test.go @@ -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) } } diff --git a/general_tests/datachrg1_test.go b/general_tests/datachrg1_test.go index 088e396ce..d335286ec 100644 --- a/general_tests/datachrg1_test.go +++ b/general_tests/datachrg1_test.go @@ -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) } } diff --git a/general_tests/ddazmbl1_test.go b/general_tests/ddazmbl1_test.go index 1884d24eb..53839cc76 100644 --- a/general_tests/ddazmbl1_test.go +++ b/general_tests/ddazmbl1_test.go @@ -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) } } diff --git a/general_tests/ddazmbl2_test.go b/general_tests/ddazmbl2_test.go index 18b7ba4de..576d17ee0 100644 --- a/general_tests/ddazmbl2_test.go +++ b/general_tests/ddazmbl2_test.go @@ -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) } } diff --git a/general_tests/ddazmbl3_test.go b/general_tests/ddazmbl3_test.go index 541584982..d72e80935 100644 --- a/general_tests/ddazmbl3_test.go +++ b/general_tests/ddazmbl3_test.go @@ -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) } } diff --git a/general_tests/smschrg1_test.go b/general_tests/smschrg1_test.go index 444f1357d..f7f036aa0 100644 --- a/general_tests/smschrg1_test.go +++ b/general_tests/smschrg1_test.go @@ -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) } }