diff --git a/apier/v1/apier.go b/apier/v1/apier.go index 464614381..26b18a152 100644 --- a/apier/v1/apier.go +++ b/apier/v1/apier.go @@ -1066,11 +1066,11 @@ func (self *ApierV1) GetLoadHistory(attrs utils.Paginator, reply *[]*engine.Load return nil } -type AttrRemActions struct { +type AttrRemoveActions struct { ActionIDs []string } -func (self *ApierV1) RemActions(attr AttrRemActions, reply *string) error { +func (self *ApierV1) RemoveActions(attr AttrRemoveActions, reply *string) error { if attr.ActionIDs == nil { err := utils.ErrNotFound *reply = err.Error() diff --git a/console/actions_remove.go b/console/actions_remove.go index c7d5f54db..b0ab87260 100644 --- a/console/actions_remove.go +++ b/console/actions_remove.go @@ -23,7 +23,7 @@ import "github.com/cgrates/cgrates/apier/v1" func init() { c := &CmdRemoveActions{ name: "actions_remove", - rpcMethod: "ApierV1.RemActions", + rpcMethod: "ApierV1.RemoveActions", } commands[c.Name()] = c c.CommandExecuter = &CommandExecuter{c} @@ -33,7 +33,7 @@ func init() { type CmdRemoveActions struct { name string rpcMethod string - rpcParams *v1.AttrRemActions + rpcParams *v1.AttrRemoveActions *CommandExecuter } @@ -47,7 +47,7 @@ func (self *CmdRemoveActions) RpcMethod() string { func (self *CmdRemoveActions) RpcParams(reset bool) interface{} { if reset || self.rpcParams == nil { - self.rpcParams = &v1.AttrRemActions{} + self.rpcParams = &v1.AttrRemoveActions{} } return self.rpcParams } diff --git a/general_tests/tp_it_test.go b/general_tests/tp_it_test.go index 0a1681ec1..06e179fc3 100644 --- a/general_tests/tp_it_test.go +++ b/general_tests/tp_it_test.go @@ -293,7 +293,7 @@ func TestTpCreateExecuteActionMatch(t *testing.T) { } } -func TestTpSetRemActions(t *testing.T) { +func TestTpSetRemoveActions(t *testing.T) { if !*testIntegration { return } @@ -323,12 +323,12 @@ func TestTpSetRemActions(t *testing.T) { } else if len(actionsMap) != 1 { t.Errorf("Calling ApierV2.GetActions got reply: %s", utils.ToIJSON(actionsMap)) } - if err := tpRPC.Call("ApierV2.RemActions", v1.AttrRemActions{ + if err := tpRPC.Call("ApierV2.RemoveActions", v1.AttrRemoveActions{ ActionIDs: []string{"PAYMENT_2056bd2fe137082970f97102b64e42fd"}, }, &reply); err != nil { - t.Error("Got error on ApierV2.RemActions: ", err.Error()) + t.Error("Got error on ApierV2.RemoveActions: ", err.Error()) } else if reply != utils.OK { - t.Errorf("Calling ApierV2.RemActions got reply: %s", reply) + t.Errorf("Calling ApierV2.RemoveActions got reply: %s", reply) } if err := tpRPC.Call("ApierV2.GetActions", v2.AttrGetActions{ ActionIDs: []string{"PAYMENT_2056bd2fe137082970f97102b64e42fd"}, @@ -337,7 +337,7 @@ func TestTpSetRemActions(t *testing.T) { } } -func TestTpRemActionsRefenced(t *testing.T) { +func TestTpRemoveActionsRefenced(t *testing.T) { if !*testIntegration { return } @@ -353,12 +353,12 @@ func TestTpRemActionsRefenced(t *testing.T) { t.Errorf("Calling ApierV2.GetActions got reply: %s", utils.ToIJSON(actionsMap)) } var reply string - if err := tpRPC.Call("ApierV2.RemActions", v1.AttrRemActions{ + if err := tpRPC.Call("ApierV2.RemoveActions", v1.AttrRemoveActions{ ActionIDs: []string{"TOPUP_VOICE"}, }, &reply); err != nil { - t.Error("Error on ApierV2.RemActions: ", err.Error()) + t.Error("Error on ApierV2.RemoveActions: ", err.Error()) } else if reply != utils.OK { - t.Errorf("Calling ApierV2.RemActions got reply: %s", reply) + t.Errorf("Calling ApierV2.RemoveActions got reply: %s", reply) } if err := tpRPC.Call("ApierV2.GetActions", v2.AttrGetActions{ ActionIDs: []string{"PAYMENT_2056bd2fe137082970f97102b64e42fd"},