mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Add tests for ActionProfile modifications
This commit is contained in:
committed by
Dan Christian Bogos
parent
38e7c7eb39
commit
2ab652ebdd
@@ -1462,10 +1462,15 @@
|
||||
// {"tag": "ActionFilterIDs", "path": "Actions[<~*req.8>].FilterIDs", "type": "*variable", "value": "~*req.9", "filters": ["*notempty:~*req.8:"]},
|
||||
// {"tag": "ActionTTL", "path": "Actions[<~*req.8>].TTL", "type": "*variable", "value": "~*req.10", "filters": ["*notempty:~*req.8:"]},
|
||||
// {"tag": "ActionType", "path": "Actions[<~*req.8>].Type", "type": "*variable", "value": "~*req.11", "filters": ["*notempty:~*req.8:"]},
|
||||
// {"tag": "ActionOpts", "path": "Actions[<~*req.8>].Opts", "type": "*variable", "value": "~*req.12", "filters": ["*notempty:~*req.8:"]},
|
||||
// {"tag": "ActionPath", "path": "Actions[<~*req.8>].Diktats.Path", "type": "*variable", "value": "~*req.13","new_branch":true, "filters": ["*notempty:~*req.8:"]},
|
||||
// {"tag": "ActionValue", "path": "Actions[<~*req.8>].Diktats.Value", "type": "*variable", "value": "~*req.14", "filters": ["*notempty:~*req.8:"]}
|
||||
// ]
|
||||
// {"tag": "ActionOpts", "path": "Actions[<~*req.8>].Opts", "type": "*variable", "value": "~*req.12", "filters": ["*notempty:~*req.8:"]},
|
||||
// {"tag": "ActionWeights", "path": "Actions[<~*req.8>].Weights", "type": "*variable", "value": "~*req.13", "filters": ["*notempty:~*req.8:"]},
|
||||
// {"tag": "ActionBlockers", "path": "Actions[<~*req.8>].Blockers", "type": "*variable", "value": "~*req.14", "filters": ["*notempty:~*req.8:"]},
|
||||
// {"tag": "ActionDiktatsID", "path": "Actions[<~*req.8>].Diktats.ID", "type": "*variable", "value": "~*req.15","new_branch":true, "filters": ["*notempty:~*req.8:"]},
|
||||
// {"tag": "ActionDiktatsFilterIDs", "path": "Actions[<~*req.8>].Diktats.FilterIDs", "type": "*variable", "value": "~*req.16", "filters": ["*notempty:~*req.8:"]},
|
||||
// {"tag": "ActionDiktatsOpts", "path": "Actions[<~*req.8>].Diktats.Opts", "type": "*variable", "value": "~*req.17", "filters": ["*notempty:~*req.8:"]},
|
||||
// {"tag": "ActionDiktatsWeights", "path": "Actions[<~*req.8>].Diktats.Weights", "type": "*variable", "value": "~*req.18", "filters": ["*notempty:~*req.8:"]},
|
||||
// {"tag": "ActionDiktatsBlockers", "path": "Actions[<~*req.8>].Diktats.Blockers", "type": "*variable", "value": "~*req.19", "filters": ["*notempty:~*req.8:"]},
|
||||
// ]
|
||||
// },
|
||||
// {
|
||||
// "type": "*accounts", // data source type
|
||||
|
||||
@@ -322,8 +322,13 @@
|
||||
{"tag": "ActionTTL", "path": "Actions[<~*req.8>].TTL", "type": "*variable", "value": "~*req.10", "filters": ["*notempty:~*req.8:"]},
|
||||
{"tag": "ActionType", "path": "Actions[<~*req.8>].Type", "type": "*variable", "value": "~*req.11", "filters": ["*notempty:~*req.8:"]},
|
||||
{"tag": "ActionOpts", "path": "Actions[<~*req.8>].Opts", "type": "*variable", "value": "~*req.12", "filters": ["*notempty:~*req.8:"]},
|
||||
{"tag": "ActionPath", "path": "Actions[<~*req.8>].Diktats.Path", "type": "*variable", "value": "~*req.13","new_branch":true, "filters": ["*notempty:~*req.8:"]},
|
||||
{"tag": "ActionValue", "path": "Actions[<~*req.8>].Diktats.Value", "type": "*variable", "value": "~*req.14", "filters": ["*notempty:~*req.8:"]},
|
||||
{"tag": "ActionWeights", "path": "Actions[<~*req.8>].Weights", "type": "*variable", "value": "~*req.13", "filters": ["*notempty:~*req.8:"]},
|
||||
{"tag": "ActionBlockers", "path": "Actions[<~*req.8>].Blockers", "type": "*variable", "value": "~*req.14", "filters": ["*notempty:~*req.8:"]},
|
||||
{"tag": "ActionDiktatsID", "path": "Actions[<~*req.8>].Diktats.ID", "type": "*variable", "value": "~*req.15","new_branch":true, "filters": ["*notempty:~*req.8:"]},
|
||||
{"tag": "ActionDiktatsFilterIDs", "path": "Actions[<~*req.8>].Diktats.FilterIDs", "type": "*variable", "value": "~*req.16", "filters": ["*notempty:~*req.8:"]},
|
||||
{"tag": "ActionDiktatsOpts", "path": "Actions[<~*req.8>].Diktats.Opts", "type": "*variable", "value": "~*req.17", "filters": ["*notempty:~*req.8:"]},
|
||||
{"tag": "ActionDiktatsWeights", "path": "Actions[<~*req.8>].Diktats.Weights", "type": "*variable", "value": "~*req.18", "filters": ["*notempty:~*req.8:"]},
|
||||
{"tag": "ActionDiktatsBlockers", "path": "Actions[<~*req.8>].Diktats.Blockers", "type": "*variable", "value": "~*req.19", "filters": ["*notempty:~*req.8:"]},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
@@ -119,8 +119,13 @@
|
||||
{"tag": "ActionTTL", "path": "Actions[<~*req.8>].TTL", "type": "*variable", "value": "~*req.10", "filters": ["*notempty:~*req.8:"]},
|
||||
{"tag": "ActionType", "path": "Actions[<~*req.8>].Type", "type": "*variable", "value": "~*req.11", "filters": ["*notempty:~*req.8:"]},
|
||||
{"tag": "ActionOpts", "path": "Actions[<~*req.8>].Opts", "type": "*variable", "value": "~*req.12", "filters": ["*notempty:~*req.8:"]},
|
||||
{"tag": "ActionPath", "path": "Actions[<~*req.8>].Diktats.Path", "type": "*variable", "value": "~*req.13","new_branch":true, "filters": ["*notempty:~*req.8:"]},
|
||||
{"tag": "ActionValue", "path": "Actions[<~*req.8>].Diktats.Value", "type": "*variable", "value": "~*req.14", "filters": ["*notempty:~*req.8:"]},
|
||||
{"tag": "ActionWeights", "path": "Actions[<~*req.8>].Weights", "type": "*variable", "value": "~*req.13", "filters": ["*notempty:~*req.8:"]},
|
||||
{"tag": "ActionBlockers", "path": "Actions[<~*req.8>].Blockers", "type": "*variable", "value": "~*req.14", "filters": ["*notempty:~*req.8:"]},
|
||||
{"tag": "ActionDiktatsID", "path": "Actions[<~*req.8>].Diktats.ID", "type": "*variable", "value": "~*req.15","new_branch":true, "filters": ["*notempty:~*req.8:"]},
|
||||
{"tag": "ActionDiktatsFilterIDs", "path": "Actions[<~*req.8>].Diktats.FilterIDs", "type": "*variable", "value": "~*req.16", "filters": ["*notempty:~*req.8:"]},
|
||||
{"tag": "ActionDiktatsOpts", "path": "Actions[<~*req.8>].Diktats.Opts", "type": "*variable", "value": "~*req.17", "filters": ["*notempty:~*req.8:"]},
|
||||
{"tag": "ActionDiktatsWeights", "path": "Actions[<~*req.8>].Diktats.Weights", "type": "*variable", "value": "~*req.18", "filters": ["*notempty:~*req.8:"]},
|
||||
{"tag": "ActionDiktatsBlockers", "path": "Actions[<~*req.8>].Diktats.Blockers", "type": "*variable", "value": "~*req.19", "filters": ["*notempty:~*req.8:"]},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#Tenant,ID,FilterIDs,Weights,Blocker,Schedule,TargetType,TargetIDs,ActionID,ActionFilterIDs,ActionTTL,ActionType,ActionOpts,ActionPath,ActionValue
|
||||
cgrates.org,ONE_TIME_ACT,,;10,,*asap,*accounts,1001;1002,TOPUP,,0s,*add_balance,,*balance.TestBalance.Units,10
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,,SET_BALANCE_TEST_DATA,,0s,*set_balance,,*balance.TestDataBalance.Type,*data
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,,TOPUP_TEST_DATA,,0s,*add_balance,,*balance.TestDataBalance.Units,1024
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,,SET_BALANCE_TEST_VOICE,,0s,*set_balance,,*balance.TestVoiceBalance.Type,*voice
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,,TOPUP_TEST_VOICE,,0s,*add_balance,,*balance.TestVoiceBalance.Units,15m15s
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,,SET_BALANCE_TEST_FILTERS,,0s,*set_balance,,*balance.TestVoiceBalance.Filters,*string:~*req.CustomField:500
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,,TOPUP_REM_VOICE,,0s,*rem_balance,,TestVoiceBalance2,
|
||||
#Tenant,ID,FilterIDs,Weights,Blockers,Schedule,TargetType,TargetIDs,ActionID,ActionFilterIDs,ActionTTL,ActionType,ActionOpts,ActionWeights,ActionBlockers,ActionDiktatsID,ActionDiktatsFilterIDs,ActionDiktatsOpts,ActionDiktatsWeights,ActionDiktatsBlockers
|
||||
cgrates.org,ONE_TIME_ACT,,;10,,*asap,*accounts,1001;1002,TOPUP,,0s,*add_balance,,,,ADDBALUNITS,,*balancePath:*balance.TestBalance.Units:*balanceValue:10,,
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,,SET_BALANCE_TEST_DATA,,0s,*set_balance,,,,SETBALTYPE,,*balancePath:*balance.TestDataBalance.Type;*balanceValue:*data,,
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,,TOPUP_TEST_DATA,,0s,*add_balance,,,,ADDBALUNITS,,*balancePath:*balance.TestDataBalance.Units;*balanceValue:1024,,
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,,SET_BALANCE_TEST_VOICE,,0s,*set_balance,,,,SETBALTYPE,,*balancePath:*balance.TestVoiceBalance.Type;*balanceValue:*voice,,
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,,TOPUP_TEST_VOICE,,0s,*add_balance,,,,ADDBALUNITS,,*balancePath:*balance.TestVoiceBalance.Units;*balanceValue:15m15s,,
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,,SET_BALANCE_TEST_FILTERS,,0s,*set_balance,,,,SETBALFILTER,,*balancePath:*balance.TestVoiceBalance.Filters;*balanceValue:*string:~*req.CustomField:500,,
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,,TOPUP_REM_VOICE,,0s,*rem_balance,,,,REMBAL,,*balancePath:TestVoiceBalance2,,
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#Tenant,ID,FilterIDs,Weights,Blockers,Schedule,TargetType,TargetIDs,ActionID,ActionFilterIDs,ActionTTL,ActionType,ActionOpts,ActionPath,ActionValue
|
||||
cgrates.org,ONE_TIME_ACT,,;10,,*asap,*accounts,1001;1002,TOPUP,,0s,*add_balance,,*balance.TestBalance.Units,10
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,,SET_BALANCE_TEST_DATA,,0s,*set_balance,,*balance.TestDataBalance.Type,*data
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,,TOPUP_TEST_DATA,,0s,*add_balance,,*balance.TestDataBalance.Units,1024
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,,SET_BALANCE_TEST_VOICE,,0s,*set_balance,,*balance.TestVoiceBalance.Type,*voice
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,,TOPUP_TEST_VOICE,,0s,*add_balance,,*balance.TestVoiceBalance.Units,15m15s
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,,SET_BALANCE_TEST_FILTERS,,0s,*set_balance,,*balance.TestVoiceBalance.Filters,*string:~*req.CustomField:500
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,,TOPUP_REM_VOICE,,0s,*rem_balance,,TestVoiceBalance2,
|
||||
#Tenant,ID,FilterIDs,Weights,Blockers,Schedule,TargetType,TargetIDs,ActionID,ActionFilterIDs,ActionTTL,ActionType,ActionOpts,ActionWeights,ActionBlockers,ActionDiktatsID,ActionDiktatsFilterIDs,ActionDiktatsOpts,ActionDiktatsWeights,ActionDiktatsBlockers
|
||||
cgrates.org,ONE_TIME_ACT,,;10,,*asap,*accounts,1001;1002,TOPUP,,0s,*add_balance,,,,ADDBALUNITS,,*balancePath:*balance.TestBalance.Units;*balanceValue:10,,
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,,SET_BALANCE_TEST_DATA,,0s,*set_balance,,,,SETBALTYPE,,*balancePath:*balance.TestDataBalance.Type;*balanceValue:*data,,
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,,TOPUP_TEST_DATA,,0s,*add_balance,,,,ADDBALUNITS,,*balancePath:*balance.TestDataBalance.Units;*balanceValue:1024,,
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,,SET_BALANCE_TEST_VOICE,,0s,*set_balance,,,,SETBALTYPE,,*balancePath:*balance.TestVoiceBalance.Type;*balanceValue:*voice,,
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,,TOPUP_TEST_VOICE,,0s,*add_balance,,,,ADDBALUNITS,,*balancePath:*balance.TestVoiceBalance.Units;*balanceValue:15m15s,,
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,,SET_BALANCE_TEST_FILTERS,,0s,*set_balance,,,,SETBALFILTER,,*balancePath:*balance.TestVoiceBalance.Filters;*balanceValue:*string:~*req.CustomField:500,,
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,,TOPUP_REM_VOICE,,0s,*rem_balance,,,,REMBAL,,*balancePath:TestVoiceBalance2,,
|
||||
|
@@ -26,4 +26,4 @@ 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
|
||||
cgrates.new,FLTR_1,*prefix,~*req.Destination,207;1207;+1207
|
||||
|
@@ -1,8 +1,8 @@
|
||||
#Tenant,ID,FilterIDs,Weights,Blockers,Schedule,TargetType,TargetIDs,ActionID,ActionFilterIDs,ActionTTL,ActionType,ActionOpts,ActionPath,ActionValue
|
||||
cgrates.org,ONE_TIME_ACT,,;10,,*asap,*accounts,1001;1002,TOPUP,,0s,*add_balance,,*balance.TestBalance.Units,10
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,,SET_BALANCE_TEST_DATA,,0s,*set_balance,,*balance.TestDataBalance.Type,*data
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,,TOPUP_TEST_DATA,,0s,*add_balance,,*balance.TestDataBalance.Units,1024
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,,SET_BALANCE_TEST_VOICE,,0s,*set_balance,,*balance.TestVoiceBalance.Type,*voice
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,,TOPUP_TEST_VOICE,,0s,*add_balance,,*balance.TestVoiceBalance.Units,15m15s
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,,SET_BALANCE_TEST_FILTERS,,0s,*set_balance,,*balance.TestVoiceBalance.Filters,*string:~*req.CustomField:500
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,,TOPUP_REM_VOICE,,0s,*rem_balance,,TestVoiceBalance2,
|
||||
#Tenant,ID,FilterIDs,Weights,Blockers,Schedule,TargetType,TargetIDs,ActionID,ActionFilterIDs,ActionTTL,ActionType,ActionOpts,ActionWeights,ActionBlockers,ActionDiktatsID,ActionDiktatsFilterIDs,ActionDiktatsOpts,ActionDiktatsWeights,ActionDiktatsBlockers
|
||||
cgrates.org,ONE_TIME_ACT,,;10,,*asap,*accounts,1001;1002,TOPUP,,0s,*add_balance,,,,ADDBALUNITS,,*balancePath:*balance.TestBalance.Units:*balanceValue:10,,
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,,SET_BALANCE_TEST_DATA,,0s,*set_balance,,,,SETBALTYPE,,*balancePath:*balance.TestDataBalance.Type;*balanceValue:*data,,
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,,TOPUP_TEST_DATA,,0s,*add_balance,,,,ADDBALUNITS,,*balancePath:*balance.TestDataBalance.Units;*balanceValue:1024,,
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,,SET_BALANCE_TEST_VOICE,,0s,*set_balance,,,,SETBALTYPE,,*balancePath:*balance.TestVoiceBalance.Type;*balanceValue:*voice,,
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,,TOPUP_TEST_VOICE,,0s,*add_balance,,,,ADDBALUNITS,,*balancePath:*balance.TestVoiceBalance.Units;*balanceValue:15m15s,,
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,,SET_BALANCE_TEST_FILTERS,,0s,*set_balance,,,,SETBALFILTER,,*balancePath:*balance.TestVoiceBalance.Filters;*balanceValue:*string:~*req.CustomField:500,,
|
||||
cgrates.org,ONE_TIME_ACT,,,,,,,TOPUP_REM_VOICE,,0s,*rem_balance,,,,REMBAL,,*balancePath:TestVoiceBalance2,,
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#Tenant,ID,FilterIDs,Weights,Blockers,Schedule,TargetType,TargetIDs,ActionID,ActionFilterIDs,ActionTTL,ActionType,ActionOpts,ActionPath,ActionValue
|
||||
#Tenant,ID,FilterIDs,Weights,Blockers,Schedule,TargetType,TargetIDs,ActionID,ActionFilterIDs,ActionTTL,ActionType,ActionOpts,ActionWeights,ActionBlockers,ActionDiktatsID,ActionDiktatsFilterIDs,ActionDiktatsOpts,ActionDiktatsWeights,ActionDiktatsBlockers
|
||||
|
||||
# TOPUP_RST_MONETARY_10 resets the <*default> <*monetary> balance to 10 units
|
||||
|
||||
#cgrates.org,TOPUP_RST_MONETARY_10,,;10,,*asap,*accounts,1001,TOPUP,,0s,*add_balance,,;10,;false,*asap,,,,,,10,10,,,10
|
||||
#cgrates.org,TOPUP_RST_MONETARY_10,,;10,,*asap,*accounts,1001,TOPUP,,0s,*add_balance,,;10,;false,*asap,,,,,,10,10,,,,ADDBAL,,*balanceValue:10,,
|
||||
|
||||
cgrates.org,TOPUP_RST_MONETARY_10,,;10,,*asap,*accounts,1001,TOPUP,,0s,*add_balance,,*balance.Concrete1.Units,10
|
||||
cgrates.org,TOPUP_RST_MONETARY_10,,;10,,*asap,*accounts,1001,TOPUP,,0s,*add_balance,,,,ADDBALUNITS,,*balancePath:*balance.Concrete1.Units;*balanceValue:10,,
|
||||
|
||||
|
Reference in New Issue
Block a user