mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-17 06:09:53 +05:00
Finished csv part of rateProfile load test, but commented it
This commit is contained in:
committed by
Dan Christian Bogos
parent
3808636239
commit
6ff6fe227a
@@ -130,11 +130,37 @@
|
||||
|
||||
"loaders": [
|
||||
{
|
||||
"id": "*default",
|
||||
"id": "LoaderRatesTest",
|
||||
"enabled": true,
|
||||
"tenant": "cgrates.org",
|
||||
"tp_in_dir": "/usr/share/cgrates/tariffplans/100_thousand_dest",
|
||||
"tp_out_dir": "",
|
||||
"run_delay": "0",
|
||||
"data":[
|
||||
{
|
||||
"type": "*rate_profiles",
|
||||
"file_name": "RateProfiles.csv",
|
||||
"fields": [
|
||||
{"tag": "TenantID", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "ProfileID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
|
||||
{"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~*req.2"},
|
||||
{"tag": "Weights", "path": "Weights", "type": "*variable", "value": "~*req.3"},
|
||||
{"tag": "MinCost", "path": "MinCost", "type": "*variable", "value": "~*req.4"},
|
||||
{"tag": "MaxCost", "path": "MaxCost", "type": "*variable", "value": "~*req.5"},
|
||||
{"tag": "MaxCostStrategy", "path": "MaxCostStrategy", "type": "*variable", "value": "~*req.6"},
|
||||
{"tag": "RateID", "path": "RateID", "type": "*variable", "value": "~*req.7"},
|
||||
{"tag": "RateFilterIDs", "path": "RateFilterIDs", "type": "*variable", "value": "~*req.8"},
|
||||
{"tag": "RateActivationTimes", "path": "RateActivationTimes", "type": "*variable", "value": "~*req.9"},
|
||||
{"tag": "RateWeights", "path": "RateWeights", "type": "*variable", "value": "~*req.10"},
|
||||
{"tag": "RateBlocker", "path": "RateBlocker", "type": "*variable", "value": "~*req.11"},
|
||||
{"tag": "RateIntervalStart", "path": "RateIntervalStart", "type": "*variable", "value": "~*req.12"},
|
||||
{"tag": "RateFixedFee", "path": "RateFixedFee", "type": "*variable", "value": "~*req.13"},
|
||||
{"tag": "RateRecurrentFee", "path": "RateRecurrentFee", "type": "*variable", "value": "~*req.14"},
|
||||
{"tag": "RateUnit", "path": "RateUnit", "type": "*variable", "value": "~*req.15"},
|
||||
{"tag": "RateIncrement", "path": "RateIncrement", "type": "*variable", "value": "~*req.16"},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
|
||||
@@ -145,11 +145,37 @@
|
||||
|
||||
"loaders": [
|
||||
{
|
||||
"id": "*default",
|
||||
"id": "LoaderRatesTest",
|
||||
"enabled": true,
|
||||
"tenant": "cgrates.org",
|
||||
"tp_in_dir": "/usr/share/cgrates/tariffplans/100_thousand_dest",
|
||||
"tp_out_dir": "",
|
||||
"run_delay": "0",
|
||||
"data":[
|
||||
{
|
||||
"type": "*rate_profiles",
|
||||
"file_name": "RateProfiles.csv",
|
||||
"fields": [
|
||||
{"tag": "TenantID", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "ProfileID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
|
||||
{"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~*req.2"},
|
||||
{"tag": "Weights", "path": "Weights", "type": "*variable", "value": "~*req.3"},
|
||||
{"tag": "MinCost", "path": "MinCost", "type": "*variable", "value": "~*req.4"},
|
||||
{"tag": "MaxCost", "path": "MaxCost", "type": "*variable", "value": "~*req.5"},
|
||||
{"tag": "MaxCostStrategy", "path": "MaxCostStrategy", "type": "*variable", "value": "~*req.6"},
|
||||
{"tag": "RateID", "path": "RateID", "type": "*variable", "value": "~*req.7"},
|
||||
{"tag": "RateFilterIDs", "path": "RateFilterIDs", "type": "*variable", "value": "~*req.8"},
|
||||
{"tag": "RateActivationTimes", "path": "RateActivationTimes", "type": "*variable", "value": "~*req.9"},
|
||||
{"tag": "RateWeights", "path": "RateWeights", "type": "*variable", "value": "~*req.10"},
|
||||
{"tag": "RateBlocker", "path": "RateBlocker", "type": "*variable", "value": "~*req.11"},
|
||||
{"tag": "RateIntervalStart", "path": "RateIntervalStart", "type": "*variable", "value": "~*req.12"},
|
||||
{"tag": "RateFixedFee", "path": "RateFixedFee", "type": "*variable", "value": "~*req.13"},
|
||||
{"tag": "RateRecurrentFee", "path": "RateRecurrentFee", "type": "*variable", "value": "~*req.14"},
|
||||
{"tag": "RateUnit", "path": "RateUnit", "type": "*variable", "value": "~*req.15"},
|
||||
{"tag": "RateIncrement", "path": "RateIncrement", "type": "*variable", "value": "~*req.16"},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
|
||||
@@ -136,11 +136,37 @@
|
||||
|
||||
"loaders": [
|
||||
{
|
||||
"id": "*default",
|
||||
"id": "LoaderRatesTest",
|
||||
"enabled": true,
|
||||
"tenant": "cgrates.org",
|
||||
"tp_in_dir": "/usr/share/cgrates/tariffplans/100_thousand_dest",
|
||||
"tp_out_dir": "",
|
||||
"run_delay": "0",
|
||||
"data":[
|
||||
{
|
||||
"type": "*rate_profiles",
|
||||
"file_name": "RateProfiles.csv",
|
||||
"fields": [
|
||||
{"tag": "TenantID", "path": "Tenant", "type": "*variable", "value": "~*req.0", "mandatory": true},
|
||||
{"tag": "ProfileID", "path": "ID", "type": "*variable", "value": "~*req.1", "mandatory": true},
|
||||
{"tag": "FilterIDs", "path": "FilterIDs", "type": "*variable", "value": "~*req.2"},
|
||||
{"tag": "Weights", "path": "Weights", "type": "*variable", "value": "~*req.3"},
|
||||
{"tag": "MinCost", "path": "MinCost", "type": "*variable", "value": "~*req.4"},
|
||||
{"tag": "MaxCost", "path": "MaxCost", "type": "*variable", "value": "~*req.5"},
|
||||
{"tag": "MaxCostStrategy", "path": "MaxCostStrategy", "type": "*variable", "value": "~*req.6"},
|
||||
{"tag": "RateID", "path": "RateID", "type": "*variable", "value": "~*req.7"},
|
||||
{"tag": "RateFilterIDs", "path": "RateFilterIDs", "type": "*variable", "value": "~*req.8"},
|
||||
{"tag": "RateActivationTimes", "path": "RateActivationTimes", "type": "*variable", "value": "~*req.9"},
|
||||
{"tag": "RateWeights", "path": "RateWeights", "type": "*variable", "value": "~*req.10"},
|
||||
{"tag": "RateBlocker", "path": "RateBlocker", "type": "*variable", "value": "~*req.11"},
|
||||
{"tag": "RateIntervalStart", "path": "RateIntervalStart", "type": "*variable", "value": "~*req.12"},
|
||||
{"tag": "RateFixedFee", "path": "RateFixedFee", "type": "*variable", "value": "~*req.13"},
|
||||
{"tag": "RateRecurrentFee", "path": "RateRecurrentFee", "type": "*variable", "value": "~*req.14"},
|
||||
{"tag": "RateUnit", "path": "RateUnit", "type": "*variable", "value": "~*req.15"},
|
||||
{"tag": "RateIncrement", "path": "RateIncrement", "type": "*variable", "value": "~*req.16"},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
#Tenant,Account,ActionPlanId,ActionTriggersId,AllowNegative,Disabled
|
||||
cgrates.org,1001,PACKAGE_1001,,,
|
||||
cgrates.org,1002,PACKAGE_1002,,,
|
||||
|
@@ -1,3 +0,0 @@
|
||||
#Tenant,ID,FilterIDs,Weights,Opts,BalanceID,BalanceFilterIDs,BalanceWeights,BalanceType,BalanceUnits,BalanceUnitFactors,BalanceOpts,BalanceCostIncrements,BalanceAttributeIDs,BalanceRateProfileIDs,ThresholdIDs
|
||||
cgrates.org,ACC_PRF_1,,;20,,MonetaryBalance,,;10,*monetary,14,fltr1&fltr2;100;fltr3;200,,fltr1&fltr2;1.3;2.3;3.3,attr1;attr2,,*none
|
||||
cgrates.org,1001,,,,VoiceBalance,,;10,*voice,3600000000000,,,,,,
|
||||
|
@@ -1,8 +0,0 @@
|
||||
#Tenant,ID,FilterIDs,Weight,Schedule,TargetType,TargetIDs,ActionID,ActionFilterIDs,ActionBlocker,ActionTTL,ActionType,ActionOpts,ActionPath,ActionValue
|
||||
cgrates.org,ONE_TIME_ACT,,10,*asap,*accounts,1001;1002,TOPUP,,false,0s,*add_balance,,*balance.TestBalance.Units,10
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,SET_BALANCE_TEST_DATA,,false,0s,*set_balance,,*balance.TestDataBalance.Type,*data
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,TOPUP_TEST_DATA,,false,0s,*add_balance,,*balance.TestDataBalance.Units,1024
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,SET_BALANCE_TEST_VOICE,,false,0s,*set_balance,,*balance.TestVoiceBalance.Type,*voice
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,TOPUP_TEST_VOICE,,false,0s,*add_balance,,*balance.TestVoiceBalance.Units,15m15s
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,SET_BALANCE_TEST_FILTERS,,false,0s,*set_balance,,*balance.TestVoiceBalance.Filters,*string:~*req.CustomField:500
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,TOPUP_REM_VOICE,,false,0s,*rem_balance,,TestVoiceBalance2,
|
||||
|
@@ -1,10 +0,0 @@
|
||||
#Tenant,ID,FilterIDs,Weight,AttributeFilterIDs,Path,Type,Value,Blocker
|
||||
cgrates.org,ATTR_ACNT_1001,*string:~*opts.*context:*sessions;FLTR_ACCOUNT_1001,10,,*req.OfficeGroup,*constant,Marketing,false
|
||||
cgrates.org,ATTR_SUPPLIER1,*string:~*opts.*context:*chargers,10,,*req.Subject,*constant,SUPPLIER1,false
|
||||
cgrates.org,ATTR_PAYPAL,*string:~*opts.*context:*cdrs;*string:~*req.Subject:ANY2CNT,10,,*req.PayPalAccount,*constant,paypal@cgrates.org,false
|
||||
cgrates.org,ATTR_SUBJECT_CASE1,*string:~*opts.*context:*sessions;*string:~*req.OriginID:testSSv1ItProcessEventWithGetCost,10,,*req.Subject,*constant,ANY2CNT,false
|
||||
cgrates.org,ATTR_SUBJECT_CASE2,*string:~*opts.*context:*sessions;*string:~*req.OriginID:testSSv1ItProcessEventWithGetCost2,10,,*req.Subject,*constant,SPECIAL_1002,false
|
||||
cgrates.org,ATTR_SUBJECT_CASE3,*string:~*opts.*context:*sessions;*string:~*req.OriginID:testSSv1ItProcessEventWithGetCost3,10,,*req.Subject,*constant,RP_RETAIL,false
|
||||
cgrates.org,ATTR_SUBJECT_CASE4,*string:~*opts.*context:*sessions;*string:~*req.OriginID:testSSv1ItProcessEventWithGetCost4,10,,*req.Subject,*constant,InvalidSubject,false
|
||||
cgrates.org,ATTR_SUBJECT_CASE4,,10,,*req.Category,*constant,Standard,false
|
||||
cgrates.org,ATTR_VARIABLE,*string:~*req.EventName:VariableTest,20,,*req.Category,*variable,~*req.ToR,false
|
||||
|
@@ -1,4 +0,0 @@
|
||||
#Tenant,ID,FilterIDs,Weight,RunID,AttributeIDs
|
||||
cgrates.org,Raw,,20,raw,*constant:*req.RequestType:*none
|
||||
cgrates.org,CustomerCharges,,20,CustomerCharges,*none
|
||||
cgrates.org,SupplierCharges,,10,SupplierCharges,ATTR_SUPPLIER1
|
||||
|
@@ -1,12 +0,0 @@
|
||||
#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,
|
||||
DR_TEST_1,DST_1001,RT_TEST_1,*up,4,0,
|
||||
DR_MOBILE_1CNT,DST_MOBILE,RT_1CNT,*up,5,0,
|
||||
DR_LOCAL_2CNT,DST_LOCAL,RT_2CNT,*up,5,0,
|
||||
DR_LOCAL_2CNT,DST_MOBILE,RT_2CNT,*up,5,0,
|
||||
DR_FREE,DST_FREE,RT_FREE,*up,5,0,
|
||||
DR_ANY_1CNT_SEC,*any,RT_1CNT_SEC,*up,5,0,
|
||||
DR_ANY_2CNT_SEC,*any,RT_2CNT_SEC,*up,5,0,
|
||||
|
@@ -1,9 +0,0 @@
|
||||
#Id,Prefix
|
||||
DST_1002,1002
|
||||
DST_FS,10
|
||||
DST_DE_MOBILE,+49151
|
||||
DST_1001,1001
|
||||
DST_MOBILE,+135
|
||||
DST_LOCAL,+246
|
||||
DST_FREE,077
|
||||
|
||||
|
@@ -1,29 +0,0 @@
|
||||
#Tenant[0],ID[1],Type[2],Path[3],Values[4]
|
||||
cgrates.org,FLTR_ACCOUNT_1001,*string,~*req.Account,1001
|
||||
cgrates.org,FLTR_1,*string,~*req.Account,1003;1002
|
||||
cgrates.org,FLTR_1,*prefix,~*req.Destination,10;20
|
||||
cgrates.org,FLTR_1,*rsr,~*req.Destination,1002
|
||||
cgrates.org,FLTR_ACNT_1007,*string,~*req.Account,1007
|
||||
cgrates.org,FLTR_ACNT_dan,*string,~*req.Account,dan
|
||||
cgrates.org,FLTR_SPP_ACNT_dan,*string,~*req.Account,dan
|
||||
cgrates.org,FLTR_SPP_2,*string,~*req.Account,1003
|
||||
cgrates.org,FLTR_SPP_2,*prefix,~*req.Destination,10;20
|
||||
cgrates.org,FLTR_SPP_2,*string,~*req.DistinctMatch,*highest_cost
|
||||
cgrates.org,FLTR_SPP_3,*string,~*req.DistinctMatch,*qos
|
||||
cgrates.org,FLTR_STAT_1,*string,~*req.Account,1001
|
||||
cgrates.org,FLTR_STAT_2,*string,~*req.Account,1002
|
||||
cgrates.org,FLTR_STAT_3,*string,~*req.Account,1003
|
||||
cgrates.org,FLTR_SPP_4,*string,~*req.DistinctMatch,*qos2
|
||||
cgrates.org,FLTR_SPP_5,*string,~*req.DistinctMatch,*qos3
|
||||
cgrates.org,FLTR_STAT_1_1,*string,~*req.Stat,Stat1_1
|
||||
cgrates.org,FLTR_SPP_6,*string,~*req.DistinctMatch,*qos_filtred
|
||||
cgrates.org,FLTR_QOS_SP1,*gte,~*vars.*acd,10s
|
||||
cgrates.org,FLTR_QOS_SP2,*gte,~*vars.*acd,10s
|
||||
cgrates.org,FLTR_QOS_SP2,*gte,~*vars.*tcd,11s
|
||||
cgrates.org,FLTR_SPP_QOS_2,*string,~*req.DistinctMatch,*qos_filtred2
|
||||
cgrates.org,FLTR_QOS_SP1_2,*gte,~*vars.Cost,0.1
|
||||
cgrates.org,FLTR_QOS_SP2_2,*gte,~*vars.Cost,0.2
|
||||
cgrates.org,FLTR_TEST,*string,~*req.Subject,TEST
|
||||
cgrates.org,FLTR_SPP_LOAD_DIST,*string,~*req.DistinctMatch,LoadDistStrategy
|
||||
cgrates.org,FLTR_DST_DE,*prefix,~*req.Destination,+49151
|
||||
cgrates.new,FLTR_1,*prefix,~*req.Destination,207;1207;+1207
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,11 +0,0 @@
|
||||
#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
|
||||
RT_TEST_1,0,0.05,60s,60s,60s
|
||||
RT_FREE,0,0,60s,60s,0s
|
||||
RT_1CNT_SEC,0,0.01,1s,1s,0s
|
||||
RT_2CNT_SEC,0,0.02,1s,1s,0s
|
||||
|
||||
|
||||
|
@@ -1,9 +0,0 @@
|
||||
#Tenant,Category,Subject,ActivationTime,RatingPlanId,RatesFallbackSubject
|
||||
cgrates.org,call,*any,2018-01-01T00:00:00Z,RP_TESTIT1,
|
||||
cgrates.org,call,SPECIAL_1002,2014-01-14T00:00:00Z,RP_SPECIAL_1002,
|
||||
cgrates.org,call,ANY2CNT,2018-01-01T00:00:00Z,RP_ANY2CNT,
|
||||
cgrates.org,call,SUPPLIER1,2018-01-01T00:00:00Z,RP_ANY1CNT,
|
||||
cgrates.org,Standard,TEST,2017-11-27T00:00:00Z,RP_TEST,
|
||||
cgrates.org,call,RP_RETAIL,2018-01-01T00:00:00Z,RP_RETAIL1,
|
||||
cgrates.org,free,RP_FREE,2018-01-01T00:00:00Z,RP_FREE,
|
||||
cgrates.org,*routes,*any,2018-01-01T00:00:00Z,RP_TESTIT1,
|
||||
|
@@ -1,2 +0,0 @@
|
||||
#Tenant[0],Id[1],FilterIDs[2],Weight[3],TTL[4],Limit[5],AllocationMessage[6],Blocker[7],Stored[8],ThresholdIDs[9]
|
||||
cgrates.org,RES_ACNT_1001,FLTR_ACCOUNT_1001,10,1h,1,,false,false,
|
||||
|
@@ -1,33 +0,0 @@
|
||||
#Tenant,ID,FilterIDs,Weight,Sorting,SortingParameters,RouteID,RouteFilterIDs,RouteAccountIDs,RouteRatingPlanIDs,RouteResourceIDs,RouteStatIDs,RouteWeight,RouteBlocker,RouteParameters
|
||||
cgrates.org,ROUTE_ACNT_1001,FLTR_ACCOUNT_1001,10,*weight,,route1,,,,,,20,,
|
||||
cgrates.org,ROUTE_ACNT_1001,,,,,route2,,,,,,10,,
|
||||
cgrates.org,ROUTE_WEIGHT_2,,5,*weight,,route1,,,,,,10,,
|
||||
cgrates.org,ROUTE_WEIGHT_1,FLTR_DST_DE;FLTR_ACNT_1007,10,*weight,,route1,,,,,,10,,
|
||||
cgrates.org,ROUTE_WEIGHT_1,FLTR_DST_DE,,,,route2,,,,,,20,,
|
||||
cgrates.org,ROUTE_WEIGHT_1,FLTR_ACNT_1007,,,,route3,FLTR_SPP_ACNT_dan,,,,,15,,
|
||||
cgrates.org,ROUTE_LEASTCOST_1,FLTR_1,10,*lc,,route1,,,RP_SPECIAL_1002,,,10,false,
|
||||
cgrates.org,ROUTE_LEASTCOST_1,,,,,route2,,,RP_RETAIL1,,,20,,
|
||||
cgrates.org,ROUTE_LEASTCOST_1,,,,,route3,,,RP_SPECIAL_1002,,,15,,
|
||||
cgrates.org,ROUTE_HIGHESTCOST_1,FLTR_SPP_2,20,*hc,,route1,,,RP_SPECIAL_1002,,,10,false,
|
||||
cgrates.org,ROUTE_HIGHESTCOST_1,,,,,route2,,,RP_RETAIL1,,,20,,
|
||||
cgrates.org,ROUTE_HIGHESTCOST_1,,,,,route3,,,RP_SPECIAL_1002,,,15,,
|
||||
cgrates.org,ROUTE_QOS_1,FLTR_SPP_3,20,*qos,*acd;*tcd;*asr,route1,,,,,Stat_1;Stat_1_1,10,false,
|
||||
cgrates.org,ROUTE_QOS_1,,,,,route2,,,,,Stat_2,20,,
|
||||
cgrates.org,ROUTE_QOS_1,,,,,route3,,,,,Stat_3,35,,
|
||||
cgrates.org,ROUTE_QOS_2,FLTR_SPP_4,20,*qos,*dcc,route1,,,,,Stat_1;Stat_1_1,10,false,
|
||||
cgrates.org,ROUTE_QOS_2,,,,,route2,,,,,Stat_2,20,,
|
||||
cgrates.org,ROUTE_QOS_2,,,,,route3,,,,,Stat_3,35,,
|
||||
cgrates.org,ROUTE_QOS_3,FLTR_SPP_5,20,*qos,*pdd,route1,,,,,Stat_1;Stat_1_1,10,false,
|
||||
cgrates.org,ROUTE_QOS_3,,,,,route2,,,,,Stat_2,20,,
|
||||
cgrates.org,ROUTE_QOS_3,,,,,route3,,,,,Stat_3,35,,
|
||||
cgrates.org,ROUTE_QOS_FILTRED,FLTR_SPP_6,20,*qos,*pdd,route1,FLTR_QOS_SP1,,,,Stat_1;Stat_1_1,10,false,
|
||||
cgrates.org,ROUTE_QOS_FILTRED,,,,,route2,FLTR_QOS_SP2,,,,Stat_2,20,,
|
||||
cgrates.org,ROUTE_QOS_FILTRED,,,,,route3,,,,,Stat_3,35,,
|
||||
cgrates.org,ROUTE_QOS_FILTRED2,FLTR_SPP_QOS_2,20,*qos,*acd;*tcd;*asr,route1,FLTR_QOS_SP1_2,,RP_SPECIAL_1002,,Stat_1;Stat_1_1,10,false,
|
||||
cgrates.org,ROUTE_QOS_FILTRED2,,,,,route2,FLTR_QOS_SP2_2,,RP_RETAIL1,,Stat_2,20,,
|
||||
cgrates.org,ROUTE_QOS_FILTRED2,,,,,route3,,,,,Stat_3,35,,
|
||||
cgrates.org,ROUTE_LCR,FLTR_TEST,50,*lc,,route_1,,,RP_TEST_1,,,10,,
|
||||
cgrates.org,ROUTE_LCR,,,,,route_2,,,RP_TEST_2,,,,,
|
||||
cgrates.org,ROUTE_LOAD_DIST,FLTR_SPP_LOAD_DIST,20,*load,route1:2;route2:7;*default:5,route1,,,,,Stat_Supplier1:*sum#~*req.LoadReq,10,false,
|
||||
cgrates.org,ROUTE_LOAD_DIST,,,,,route2,,,,,Stat_Supplier2:*sum#~*req.LoadReq,20,,
|
||||
cgrates.org,ROUTE_LOAD_DIST,,,,,route3,,,,,Stat_Supplier3:*sum#~*req.LoadReq,35,,
|
||||
|
@@ -1,8 +0,0 @@
|
||||
#Tenant[0],Id[1],FilterIDs[2],Weight[3],QueueLength[4],TTL[5],MinItems[6],Metrics[7],MetricFilterIDs[8],Stored[9],Blocker[10],ThresholdIDs[11]
|
||||
cgrates.org,Stat_1,FLTR_STAT_1,30,100,10s,0,*acd;*tcd;*asr,,false,true,*none
|
||||
cgrates.org,Stat_1_1,FLTR_STAT_1_1,30,100,1s,0,*acd;*tcd;*pdd,,false,true,*none
|
||||
cgrates.org,Stat_2,FLTR_STAT_2,30,100,1s,0,*acd;*tcd;*asr,,false,true,*none
|
||||
cgrates.org,Stat_3,FLTR_STAT_3,30,100,1s,0,*acd;*tcd;*asr,,false,true,*none
|
||||
cgrates.org,Stat_Supplier1,*string:~*req.StatID:Stat_Supplier1,30,100,1s,0,*sum#~*req.LoadReq,,true,true,*none
|
||||
cgrates.org,Stat_Supplier2,*string:~*req.StatID:Stat_Supplier2,30,100,1s,0,*sum#~*req.LoadReq,,true,true,*none
|
||||
cgrates.org,Stat_Supplier3,*string:~*req.StatID:Stat_Supplier3,30,100,1s,0,*sum#~*req.LoadReq,,true,true,*none
|
||||
|
@@ -1,2 +0,0 @@
|
||||
#Tenant[0],Id[1],FilterIDs[2],Weight[3],MaxHits[4],MinHits[5],MinSleep[6],Blocker[7],ActionProfileIDs[8],Async[9]
|
||||
cgrates.org,THD_ACNT_1001,FLTR_ACCOUNT_1001,10,-1,0,0,false,TOPUP_MONETARY_10,false
|
||||
|
@@ -21,14 +21,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
package apis
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path"
|
||||
"testing"
|
||||
|
||||
"github.com/cgrates/birpc"
|
||||
"github.com/cgrates/birpc/context"
|
||||
"github.com/cgrates/cgrates/config"
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
"github.com/cgrates/cgrates/loaders"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
|
||||
@@ -39,13 +39,14 @@ var (
|
||||
testDblTpDifDestRPC *birpc.Client
|
||||
|
||||
testDblTpDifDestTests = []func(t *testing.T){
|
||||
testDblTpDifDestLoadConfig,
|
||||
testDblTpDifDestResetDataDB,
|
||||
testDblTpDifDestResetStorDb,
|
||||
testDblTpDifDestStartEngine,
|
||||
testDblTpDifDestRPCConn,
|
||||
testDblTpDifDestLoadersLoad,
|
||||
testDblTpDifDestStopCgrEngine,
|
||||
//testGenerateCsv,
|
||||
// testDblTpDifDestLoadConfig,
|
||||
// testDblTpDifDestResetDataDB,
|
||||
// testDblTpDifDestResetStorDb,
|
||||
// //testDblTpDifDestStartEngine,
|
||||
// testDblTpDifDestRPCConn,
|
||||
// testDblTpDifDestLoadersLoad,
|
||||
//testDblTpDifDestStopCgrEngine,
|
||||
}
|
||||
)
|
||||
|
||||
@@ -102,18 +103,33 @@ func testDblTpDifDestRPCConn(t *testing.T) {
|
||||
}
|
||||
|
||||
func testDblTpDifDestLoadersLoad(t *testing.T) {
|
||||
var reply string
|
||||
if err := testDblTpDifDestRPC.Call(context.Background(), utils.LoaderSv1Load,
|
||||
&loaders.ArgsProcessFolder{
|
||||
StopOnError: true,
|
||||
Caching: utils.StringPointer(utils.MetaReload),
|
||||
}, &reply); err != nil {
|
||||
t.Error(err)
|
||||
} else if reply != utils.OK {
|
||||
t.Error("Unexpected reply returned:", reply)
|
||||
// var reply string
|
||||
// if err := testDblTpDifDestRPC.Call(context.Background(), utils.LoaderSv1Load,
|
||||
// &loaders.ArgsProcessFolder{
|
||||
// LoaderID: "LoaderRatesTest",
|
||||
// StopOnError: true,
|
||||
// Caching: utils.StringPointer(utils.MetaReload),
|
||||
// ForceLock: true,
|
||||
// }, &reply); err != nil {
|
||||
// t.Error(err)
|
||||
// } else if reply != utils.OK {
|
||||
// t.Error("Unexpected reply returned:", reply)
|
||||
// }
|
||||
|
||||
}
|
||||
func testGenerateCsv(t *testing.T) {
|
||||
filename := "/tmp/dat2"
|
||||
os.Remove(filename)
|
||||
f, _ := os.Create(filename)
|
||||
fmt.Fprintf(f, `#Tenant,ID,FilterIDs,Weights,MinCost,MaxCost,MaxCostStrategy,RateID,RateFilterIDs,RateActivationStart,RateWeights,RateBlocker,RateIntervalStart,RateFixedFee,RateRecurrentFee,RateUnit,RateIncrement`+"\n")
|
||||
n := 100000
|
||||
for i := 1; i <= n; i++ {
|
||||
fmt.Fprintf(f, `cgrates.org,RT_RETAIL%v,,,,,,RT_1,*prefix:~*req.Destination:%v,"* * * * *",,,0s,,0.4,1m,30s`, i, i)
|
||||
fmt.Fprintf(f, "\n")
|
||||
fmt.Fprintf(f, `cgrates.org,RT_RETAIL%v,,,,,,RT_1_CHRISTMAS,*prefix:~*req.Destination:%v,* * 24 12 *,;30,false,0s,,0.06,1m,1s`, i, i)
|
||||
fmt.Fprintf(f, "\n")
|
||||
}
|
||||
}
|
||||
|
||||
func testDblTpDifDestStopCgrEngine(t *testing.T) {
|
||||
if err := engine.KillEngine(100); err != nil {
|
||||
t.Error(err)
|
||||
Reference in New Issue
Block a user