Update integration test

This commit is contained in:
TeoV
2021-01-06 14:38:31 +02:00
committed by Dan Christian Bogos
parent 6887863ed1
commit 6980a3f322
5 changed files with 14 additions and 11 deletions

View File

@@ -825,7 +825,7 @@ func testApierLoadRatingProfileWithoutTenant(t *testing.T) {
func testApierLoadAccountActions(t *testing.T) {
var rcvStats map[string]*ltcache.CacheStats
expectedStats := engine.GetDefaultEmptyCacheStats() // Make sure nothing in cache so far
expectedStats[utils.CacheLoadIDs].Items = 5 // we loaded the ratingprofiles
expectedStats[utils.CacheLoadIDs].Items = 4 // we loaded the ratingprofiles
if err := rater.Call(utils.CacheSv1GetCacheStats, new(utils.AttrCacheIDsWithOpts), &rcvStats); err != nil {
t.Error("Got error on CacheSv1.GetCacheStats: ", err.Error())
} else if !reflect.DeepEqual(expectedStats, rcvStats) {
@@ -842,7 +842,7 @@ func testApierLoadAccountActions(t *testing.T) {
expectedStats[utils.CacheAccountActionPlans].Items = 1
expectedStats[utils.CacheActionPlans].Items = 1
expectedStats[utils.CacheActions].Items = 1
expectedStats[utils.CacheLoadIDs].Items = 9
expectedStats[utils.CacheLoadIDs].Items = 8
expectedStats[utils.CacheRPCConnections].Items = 1
if err := rater.Call(utils.CacheSv1GetCacheStats, new(utils.AttrCacheIDsWithOpts), &rcvStats); err != nil {
t.Error("Got error on CacheSv1.GetCacheStats: ", err.Error())
@@ -880,7 +880,7 @@ func testApierSetRatingProfile(t *testing.T) {
expectedStats[utils.CacheActions].Items = 1
expectedStats[utils.CacheRatingProfiles].Items = 1
expectedStats[utils.CacheRPCConnections].Items = 1
expectedStats[utils.CacheLoadIDs].Items = 9
expectedStats[utils.CacheLoadIDs].Items = 8
if err := rater.Call(utils.CacheSv1GetCacheStats, new(utils.AttrCacheIDsWithOpts), &rcvStats); err != nil {
t.Error("Got error on CacheSv1.GetCacheStats: ", err.Error())
} else if !reflect.DeepEqual(expectedStats, rcvStats) {
@@ -1031,7 +1031,7 @@ func testApierReloadCache(t *testing.T) {
expectedStats[utils.CacheRatingProfiles].Items = 3
expectedStats[utils.CacheRatingPlans].Items = 1
expectedStats[utils.CacheReverseDestinations].Items = 10
expectedStats[utils.CacheLoadIDs].Items = 9
expectedStats[utils.CacheLoadIDs].Items = 8
expectedStats[utils.CacheRPCConnections].Items = 1
if err := rater.Call(utils.CacheSv1GetCacheStats, new(utils.AttrCacheIDsWithOpts), &rcvStats); err != nil {
t.Error("Got error on CacheSv1.GetCacheStats: ", err.Error())
@@ -1580,7 +1580,7 @@ func testApierResetDataAfterLoadFromFolder(t *testing.T) {
expStats[utils.CacheActionPlans].Items = 7
expStats[utils.CacheActions].Items = 5
expStats[utils.CacheDestinations].Items = 3
expStats[utils.CacheLoadIDs].Items = 18
expStats[utils.CacheLoadIDs].Items = 17
expStats[utils.CacheRPCConnections].Items = 2
if err := rater.Call(utils.CacheSv1GetCacheStats, new(utils.AttrCacheIDsWithOpts), &rcvStats); err != nil {
t.Error("Got error on CacheSv1.GetCacheStats: ", err.Error())
@@ -1608,7 +1608,7 @@ func testApierResetDataAfterLoadFromFolder(t *testing.T) {
expStats[utils.CacheRouteProfiles].Items = 2
expStats[utils.CacheThresholdProfiles].Items = 1
expStats[utils.CacheThresholds].Items = 1
expStats[utils.CacheLoadIDs].Items = 34
expStats[utils.CacheLoadIDs].Items = 33
expStats[utils.CacheTimings].Items = 12
expStats[utils.CacheThresholdFilterIndexes].Items = 5
expStats[utils.CacheThresholdFilterIndexes].Groups = 1

View File

@@ -133,7 +133,7 @@ func testCacheSAfterLoadFromFolder(t *testing.T) {
expStats[utils.CacheActionPlans].Items = 7
expStats[utils.CacheActions].Items = 5
expStats[utils.CacheDestinations].Items = 3
expStats[utils.CacheLoadIDs].Items = 18
expStats[utils.CacheLoadIDs].Items = 17
expStats[utils.CacheRPCConnections].Items = 2
if err := chcRPC.Call(utils.CacheSv1GetCacheStats, &utils.AttrCacheIDsWithOpts{}, &rcvStats); err != nil {
t.Error("Got error on CacheSv1.GetCacheStats: ", err.Error())
@@ -161,7 +161,7 @@ func testCacheSAfterLoadFromFolder(t *testing.T) {
expStats[utils.CacheRouteProfiles].Items = 2
expStats[utils.CacheThresholdProfiles].Items = 1
expStats[utils.CacheThresholds].Items = 1
expStats[utils.CacheLoadIDs].Items = 34
expStats[utils.CacheLoadIDs].Items = 33
expStats[utils.CacheTimings].Items = 12
expStats[utils.CacheThresholdFilterIndexes].Items = 5
expStats[utils.CacheThresholdFilterIndexes].Groups = 1

View File

@@ -100,7 +100,7 @@ func testDspChcLoadAfterFolder(t *testing.T) {
expStats[utils.CacheActionPlans].Items = 1
expStats[utils.CacheActions].Items = 1
expStats[utils.CacheDestinations].Items = 4
expStats[utils.CacheLoadIDs].Items = 18
expStats[utils.CacheLoadIDs].Items = 17
expStats[utils.CacheRPCConnections].Items = 2
args := utils.AttrCacheIDsWithOpts{
Opts: map[string]interface{}{
@@ -140,7 +140,7 @@ func testDspChcLoadAfterFolder(t *testing.T) {
expStats[utils.CacheRouteProfiles].Items = 3
expStats[utils.CacheThresholdProfiles].Items = 2
expStats[utils.CacheThresholds].Items = 2
expStats[utils.CacheLoadIDs].Items = 34
expStats[utils.CacheLoadIDs].Items = 32
expStats[utils.CacheTimings].Items = 10
expStats[utils.CacheThresholdFilterIndexes].Items = 2
expStats[utils.CacheThresholdFilterIndexes].Groups = 1

View File

@@ -152,7 +152,7 @@ func testTutSMGCacheStats(t *testing.T) {
expectedStats[utils.CacheAttributeProfiles].Items = 2
expectedStats[utils.MetaDefault].Items = 1
expectedStats[utils.CacheActionTriggers].Items = 1
expectedStats[utils.CacheLoadIDs].Items = 33
expectedStats[utils.CacheLoadIDs].Items = 32
expectedStats[utils.CacheChargerProfiles].Items = 1
expectedStats[utils.CacheRPCConnections].Items = 2
expectedStats[utils.CacheTimings].Items = 14

View File

@@ -1474,6 +1474,9 @@ const (
APIerSv1RemoveAccountProfile = "APIerSv1.RemoveAccountProfile"
APIerSv1GetAccountProfileIDsCount = "APIerSv1.GetAccountProfileIDsCount"
APIerSv1GetTPAccountProfileIDs = "APIerSv1.GetTPAccountProfileIDs"
APIerSv1GetTPAccountProfile = "APIerSv1.GetTPAccountProfile"
APIerSv1SetTPAccountProfile = "APIerSv1.SetTPAccountProfile"
APIerSv1RemoveTPAccountProfile = "APIerSv1.RemoveTPAccountProfile"
)
// APIerSv1 TP APIs