mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Update integration test for apier/v2
This commit is contained in:
committed by
Dan Christian Bogos
parent
0911b42ac0
commit
462dc17aaa
@@ -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 {
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
"rals": {
|
||||
"enabled": true,
|
||||
"thresholds_conns": ["*localhost"],
|
||||
"dynaprepaid_actionplans": ["PACKAGE_1001"],
|
||||
},
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
"rals": {
|
||||
"enabled": true,
|
||||
"thresholds_conns": ["*localhost"],
|
||||
"dynaprepaid_actionplans": ["PACKAGE_1001"],
|
||||
},
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
|
||||
"rals": {
|
||||
"enabled": true,
|
||||
"thresholds_conns": ["conn1"],
|
||||
"dynaprepaid_actionplans": ["PACKAGE_1001"],
|
||||
},
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
"rals": {
|
||||
"enabled": true,
|
||||
"thresholds_conns": ["*localhost"],
|
||||
"dynaprepaid_actionplans": ["PACKAGE_1001"],
|
||||
},
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
"rals": {
|
||||
"enabled": true,
|
||||
"thresholds_conns": ["conn1"],
|
||||
"dynaprepaid_actionplans": ["PACKAGE_1001"],
|
||||
},
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
"rals": {
|
||||
"enabled": true,
|
||||
"thresholds_conns": ["*localhost"],
|
||||
"dynaprepaid_actionplans": ["PACKAGE_1001"],
|
||||
},
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user