Integration tests for CdrsV2.ProcesCDR with ChargerS

This commit is contained in:
DanB
2018-08-24 20:25:04 +02:00
parent 9ee04fa97b
commit aa6e18b27b
15 changed files with 466 additions and 204 deletions

View File

@@ -9,19 +9,33 @@
},
"stor_db": { // database used to store offline tariff plans and CDRs
"db_password": "CGRateS.org", // password to use when connecting to stordb
"stor_db": {
"db_password": "CGRateS.org",
},
"rals": {
"enabled": true, // enable Rater service: <true|false>
"enabled": true,
},
"cdrs": {
"enabled": true, // start the CDR Server service: <true|false>
"enabled": true,
"chargers_conns":[
{"address": "127.0.0.1:2012", "transport":"*json"},
],
"rals_conns": [
{"address": "*internal"} // address where to reach the Rater for cost calculation, empty to disable functionality: <""|*internal|x.y.z.y:1234>
{"address": "*internal"}
],
},
"attributes": {
"enabled": true,
},
"chargers": {
"enabled": true,
"attributes_conns": [
{"address": "127.0.0.1:2012", "transport":"*json"},
],
},

View File

@@ -74,6 +74,9 @@
"cdrs": {
"enabled": true,
"chargers_conns":[
{"address": "127.0.0.1:2012", "transport":"*json"},
],
},
@@ -226,7 +229,7 @@
"chargers": {
"enabled": true,
"attributes_conns": [
{"address": "*internal"}
{"address": "127.0.0.1:2012", "transport":"*json"},
],
},

View File

@@ -1,2 +1,4 @@
#Tenant,ID,Context,FilterIDs,ActivationInterval,FieldName,Initial,Substitute,Append,Blocker,Weight
cgrates.org,ATTR_ACNT_1001,*sessions,FLTR_ACCOUNT_1001,,OfficeGroup,*any,Marketing,true,false,10
cgrates.org,ATTR_SUPPLIER1,*chargers,*string:Category:customers,,Subject,*any,supplier1,false,false,10
cgrates.org,ATTR_SUPPLIER1,,,,Category,*any,call,false,false,10
1 #Tenant ID Context FilterIDs ActivationInterval FieldName Initial Substitute Append Blocker Weight
2 cgrates.org ATTR_ACNT_1001 *sessions FLTR_ACCOUNT_1001 OfficeGroup *any Marketing true false 10
3 cgrates.org ATTR_SUPPLIER1 *chargers *string:Category:customers Subject *any supplier1 false false 10
4 cgrates.org ATTR_SUPPLIER1 Category *any call false false 10

View File

@@ -0,0 +1,3 @@
#Tenant,ID,FilterIDs,ActivationInterval,RunID,AttributeIDs,Weight
cgrates.org,CustomerCharges,,,CustomerCharges,,20
cgrates.org,SupplierCharges,,,SupplierCharges,ATTR_SUPPLIER1,10
1 #Tenant ID FilterIDs ActivationInterval RunID AttributeIDs Weight
2 cgrates.org CustomerCharges CustomerCharges 20
3 cgrates.org SupplierCharges SupplierCharges ATTR_SUPPLIER1 10

View File

@@ -1,4 +1,5 @@
#Id,DestinationId,RatesTag,RoundingMethod,RoundingDecimals,MaxCost,MaxCostStrategy
DR_ANY_1CNT,*any,RT_1CNT,*up,5,0,
DR_ANY_2CNT,*any,RT_2CNT,*up,5,0,
DR_SPECIAL_1002,DST_1002,RT_1CNT,*up,4,0,
DR_FS_40CNT,DST_FS,RT_40CNT,*up,4,0,
1 #Id DestinationId RatesTag RoundingMethod RoundingDecimals MaxCost MaxCostStrategy
2 DR_ANY_1CNT *any RT_1CNT *up 5 0
3 DR_ANY_2CNT *any RT_2CNT *up 5 0
4 DR_SPECIAL_1002 DST_1002 RT_1CNT *up 4 0
5 DR_FS_40CNT DST_FS RT_40CNT *up 4 0

View File

@@ -1,4 +1,5 @@
#Id,ConnectFee,Rate,RateUnit,RateIncrement,GroupIntervalStart
RT_1CNT,0,0.01,60s,1s,0s
RT_2CNT,0,0.02,60s,1s,0s
RT_40CNT,0.8,0.4,60s,30s,0s
RT_40CNT,0,0.2,60s,10s,60s
1 #Id ConnectFee Rate RateUnit RateIncrement GroupIntervalStart
2 RT_1CNT 0 0.01 60s 1s 0s
3 RT_2CNT 0 0.02 60s 1s 0s
4 RT_40CNT 0.8 0.4 60s 30s 0s
5 RT_40CNT 0 0.2 60s 10s 60s

View File

@@ -1,4 +1,6 @@
#Id,DestinationRatesId,TimingTag,Weight
RP_TESTIT1,DR_ANY_1CNT,*any,10
RP_SPECIAL_1002,DR_SPECIAL_1002,*any,10
RP_RETAIL1,DR_FS_40CNT,*any,10
RP_RETAIL1,DR_FS_40CNT,*any,10
RP_ANY2CNT,DR_ANY_2CNT,*any,10
RP_ANY1CNT,DR_ANY_1CNT,*any,10
1 #Id DestinationRatesId TimingTag Weight
2 RP_TESTIT1 DR_ANY_1CNT *any 10
3 RP_SPECIAL_1002 DR_SPECIAL_1002 *any 10
4 RP_RETAIL1 DR_FS_40CNT *any 10
5 RP_ANY2CNT DR_ANY_2CNT *any 10
6 RP_ANY1CNT DR_ANY_1CNT *any 10

View File

@@ -1,3 +1,6 @@
#Direction,Tenant,Category,Subject,ActivationTime,RatingPlanId,RatesFallbackSubject,CdrStatQueueIds
*out,cgrates.org,call,*any,2018-01-01T00:00:00Z,RP_TESTIT1,,
*out,cgrates.org,call,SPECIAL_1002,2014-01-14T00:00:00Z,RP_SPECIAL_1002,,
*out,cgrates.org,customers,*any,2018-01-01T00:00:00Z,RP_ANY2CNT,,
*out,cgrates.org,call,supplier1,2018-01-01T00:00:00Z,RP_ANY1CNT,,
1 #Direction Tenant Category Subject ActivationTime RatingPlanId RatesFallbackSubject CdrStatQueueIds
2 *out cgrates.org call *any 2018-01-01T00:00:00Z RP_TESTIT1
3 *out cgrates.org call SPECIAL_1002 2014-01-14T00:00:00Z RP_SPECIAL_1002
4 *out cgrates.org customers *any 2018-01-01T00:00:00Z RP_ANY2CNT
5 *out cgrates.org call supplier1 2018-01-01T00:00:00Z RP_ANY1CNT
6