Update integration test for apier/v2

This commit is contained in:
TeoV
2020-10-19 16:41:52 +03:00
committed by Dan Christian Bogos
parent 0911b42ac0
commit 462dc17aaa
8 changed files with 4 additions and 10 deletions

View File

@@ -59,7 +59,7 @@ var (
testV2CDRsGetCdrsNoRattingPlan,
testV2CDRsRateCDRsWithRatingPlan,
testV2CDRsGetCdrsWithRattingPlan,
testV2CDRsGetCdrsWithRatingPlan,
testV2CDRsSetThreshold,
testV2CDRsProcessCDRWithThreshold,
@@ -674,7 +674,7 @@ func testV2CDRsRateCDRsWithRatingPlan(t *testing.T) {
}
}
func testV2CDRsGetCdrsWithRattingPlan(t *testing.T) {
func testV2CDRsGetCdrsWithRatingPlan(t *testing.T) {
var cdrCnt int64
req := utils.AttrGetCdrs{}
if err := cdrsRpc.Call(utils.APIerSv2CountCDRs, &req, &cdrCnt); err != nil {

View File

@@ -16,7 +16,6 @@
"rals": {
"enabled": true,
"thresholds_conns": ["*localhost"],
"dynaprepaid_actionplans": ["PACKAGE_1001"],
},

View File

@@ -16,7 +16,6 @@
"rals": {
"enabled": true,
"thresholds_conns": ["*localhost"],
"dynaprepaid_actionplans": ["PACKAGE_1001"],
},

View File

@@ -25,7 +25,6 @@
"rals": {
"enabled": true,
"thresholds_conns": ["conn1"],
"dynaprepaid_actionplans": ["PACKAGE_1001"],
},

View File

@@ -16,7 +16,6 @@
"rals": {
"enabled": true,
"thresholds_conns": ["*localhost"],
"dynaprepaid_actionplans": ["PACKAGE_1001"],
},

View File

@@ -24,7 +24,6 @@
"rals": {
"enabled": true,
"thresholds_conns": ["conn1"],
"dynaprepaid_actionplans": ["PACKAGE_1001"],
},

View File

@@ -16,7 +16,6 @@
"rals": {
"enabled": true,
"thresholds_conns": ["*localhost"],
"dynaprepaid_actionplans": ["PACKAGE_1001"],
},

View File

@@ -189,7 +189,7 @@ func (tS *ThresholdService) runBackup() {
// storeThresholds represents one task of complete backup
func (tS *ThresholdService) storeThresholds() {
var failedTdIDs []string
for { // don't stop untill we store all dirty resources
for { // don't stop until we store all dirty resources
tS.stMux.Lock()
tID := tS.storedTdIDs.GetOne()
if tID != "" {
@@ -200,7 +200,7 @@ func (tS *ThresholdService) storeThresholds() {
break // no more keys, backup completed
}
if tIf, ok := Cache.Get(utils.CacheThresholds, tID); !ok || tIf == nil {
utils.Logger.Warning(fmt.Sprintf("<ThresholdS> failed retrieving from cache resource with ID: %s", tID))
utils.Logger.Warning(fmt.Sprintf("<ThresholdS> failed retrieving from cache treshold with ID: %s", tID))
} else if err := tS.StoreThreshold(tIf.(*Threshold)); err != nil {
failedTdIDs = append(failedTdIDs, tID) // record failure so we can schedule it for next backup
}