mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Updated tpe_actions
This commit is contained in:
committed by
Dan Christian Bogos
parent
6cba39a636
commit
07f697edeb
@@ -822,7 +822,7 @@ func testTPeSetActions(t *testing.T) {
|
||||
"*string:~*req.Account:1001"},
|
||||
Weights: utils.DynamicWeights{
|
||||
{
|
||||
Weight: 0,
|
||||
Weight: 10,
|
||||
},
|
||||
},
|
||||
Targets: map[string]utils.StringSet{utils.MetaAccounts: {"1001": {}}},
|
||||
@@ -852,6 +852,11 @@ func testTPeSetActions(t *testing.T) {
|
||||
ActionProfile: &engine.ActionProfile{
|
||||
Tenant: "cgrates.org",
|
||||
ID: "Execute_thd",
|
||||
Weights: utils.DynamicWeights{
|
||||
{
|
||||
Weight: 20,
|
||||
},
|
||||
},
|
||||
Actions: []*engine.APAction{
|
||||
{
|
||||
ID: "actID",
|
||||
@@ -861,7 +866,6 @@ func testTPeSetActions(t *testing.T) {
|
||||
Targets: map[string]utils.StringSet{
|
||||
utils.MetaThresholds: {
|
||||
"THD_1": struct{}{},
|
||||
"THD_2": struct{}{},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -980,6 +984,8 @@ func testTPeSExportTariffPlan(t *testing.T) {
|
||||
},
|
||||
utils.ActionsCsv: {
|
||||
{"#Tenant", "ID", "FilterIDs", "Weights", "Schedule", "TargetType", "TargetIDs", "ActionID", "ActionFilterIDs", "ActionBlocker", "ActionTTL", "ActionType", "ActionOpts", "ActionPath", "ActionValue"},
|
||||
{"cgrates.org", "Execute_thd", "", ";20", "", "*thresholds", "THD_1", "actID", "", "false", "0s", "*reset_threshold", "", "", ""},
|
||||
{"cgrates.org", "SET_BAL", "*string:~*req.Account:1001", ";10", "*asap", "*accounts", "1001", "SET_BAL", "", "false", "0s", "*set_balance", "", "MONETARY", "10"},
|
||||
},
|
||||
}
|
||||
expected[utils.RatesCsv] = csvRply[utils.RatesCsv]
|
||||
|
||||
@@ -2129,8 +2129,8 @@ func APItoModelTPActionProfile(tPrf *utils.TPActionProfile) (mdls ActionProfileM
|
||||
}
|
||||
mdl.ActionPath = actD.Path
|
||||
mdl.ActionValue = actD.Value
|
||||
mdls = append(mdls, mdl)
|
||||
}
|
||||
mdls = append(mdls, mdl)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user