mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-20 22:58:44 +05:00
another converter fix
This commit is contained in:
@@ -215,7 +215,7 @@ func APItoModelActionTrigger(ats *utils.TPActionTriggers) (result []TpActionTrig
|
||||
for _, at := range ats.ActionTriggers {
|
||||
result = append(result, TpActionTrigger{
|
||||
Tpid: ats.TPid,
|
||||
Tag: ats.ActionTriggersId,
|
||||
Tag: at.Id,
|
||||
UniqueId: at.UniqueID,
|
||||
ThresholdType: at.ThresholdType,
|
||||
ThresholdValue: at.ThresholdValue,
|
||||
|
||||
@@ -551,6 +551,8 @@ func TestTPActionPlanAsExportSlice(t *testing.T) {
|
||||
ActionTriggersId: "STANDARD_TRIGGERS",
|
||||
ActionTriggers: []*utils.TPActionTrigger{
|
||||
&utils.TPActionTrigger{
|
||||
Id: "STANDARD_TRIGGERS",
|
||||
UniqueID: "1",
|
||||
ThresholdType: "*min_balance",
|
||||
ThresholdValue: 2.0,
|
||||
Recurrent: false,
|
||||
@@ -570,6 +572,8 @@ func TestTPActionPlanAsExportSlice(t *testing.T) {
|
||||
ActionsId: "LOG_WARNING",
|
||||
Weight: 10},
|
||||
&utils.TPActionTrigger{
|
||||
Id: "STANDARD_TRIGGERS",
|
||||
UniqueID: "2",
|
||||
ThresholdType: "*max_event_counter",
|
||||
ThresholdValue: 5.0,
|
||||
Recurrent: false,
|
||||
@@ -591,8 +595,8 @@ func TestTPActionPlanAsExportSlice(t *testing.T) {
|
||||
},
|
||||
}
|
||||
expectedSlc := [][]string{
|
||||
[]string{"STANDARD_TRIGGERS", "", "*min_balance", "2", "false", "0", "b1", "*monetary", "*out", "call", "", "special1", "SHARED_1", "*never", "T1", "0", "false", "0", "LOG_WARNING", "10"},
|
||||
[]string{"STANDARD_TRIGGERS", "", "*max_event_counter", "5", "false", "0", "b2", "*monetary", "*out", "call", "FS_USERS", "special1", "SHARED_1", "*never", "T1", "0", "false", "0", "LOG_WARNING", "10"},
|
||||
[]string{"STANDARD_TRIGGERS", "1", "*min_balance", "2", "false", "0", "b1", "*monetary", "*out", "call", "", "special1", "SHARED_1", "*never", "T1", "0", "false", "0", "LOG_WARNING", "10"},
|
||||
[]string{"STANDARD_TRIGGERS", "2", "*max_event_counter", "5", "false", "0", "b2", "*monetary", "*out", "call", "FS_USERS", "special1", "SHARED_1", "*never", "T1", "0", "false", "0", "LOG_WARNING", "10"},
|
||||
}
|
||||
ms := APItoModelActionTrigger(at)
|
||||
var slc [][]string
|
||||
|
||||
Reference in New Issue
Block a user