mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Changed name from RemFilter to RemoveFilter
This commit is contained in:
committed by
Dan Christian Bogos
parent
443b666e6f
commit
01badb9625
@@ -51,8 +51,8 @@ func (self *ApierV1) GetFilter(arg utils.TenantID, reply *engine.Filter) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
//RemFilter remove a specific filter
|
||||
func (self *ApierV1) RemFilter(arg utils.TenantID, reply *string) error {
|
||||
//RemoveFilter remove a specific filter
|
||||
func (self *ApierV1) RemoveFilter(arg utils.TenantID, reply *string) error {
|
||||
if missing := utils.MissingStructFields(&arg, []string{"Tenant", "ID"}); len(missing) != 0 { //Params missing
|
||||
return utils.NewErrMandatoryIeMissing(missing...)
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ var sTestsFilter = []func(t *testing.T){
|
||||
testFilterGetFilterAfterSet,
|
||||
testFilterUpdateFilter,
|
||||
testFilterGetFilterAfterUpdate,
|
||||
testFilterRemFilter,
|
||||
testFilterRemoveFilter,
|
||||
testFilterGetFilterAfterRemove,
|
||||
testFilterKillEngine,
|
||||
}
|
||||
@@ -190,9 +190,9 @@ func testFilterGetFilterAfterUpdate(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func testFilterRemFilter(t *testing.T) {
|
||||
func testFilterRemoveFilter(t *testing.T) {
|
||||
var resp string
|
||||
if err := filterRPC.Call("ApierV1.RemFilter", &utils.TenantID{Tenant: "cgrates.org", ID: "Filter1"}, &resp); err != nil {
|
||||
if err := filterRPC.Call("ApierV1.RemoveFilter", &utils.TenantID{Tenant: "cgrates.org", ID: "Filter1"}, &resp); err != nil {
|
||||
t.Error(err)
|
||||
} else if resp != utils.OK {
|
||||
t.Error("Unexpected reply returned", resp)
|
||||
|
||||
@@ -23,7 +23,7 @@ import "github.com/cgrates/cgrates/utils"
|
||||
func init() {
|
||||
c := &CmdRemoveFilter{
|
||||
name: "filter_remove",
|
||||
rpcMethod: "ApierV1.RemFilter",
|
||||
rpcMethod: "ApierV1.RemoveFilter",
|
||||
rpcParams: &utils.TenantID{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
|
||||
Reference in New Issue
Block a user