diff --git a/apier/v1/filter_indexes_it_test.go b/apier/v1/filter_indexes_it_test.go index 2d06bdb48..70efc2f19 100644 --- a/apier/v1/filter_indexes_it_test.go +++ b/apier/v1/filter_indexes_it_test.go @@ -1339,13 +1339,13 @@ func testV1FIdxRemoveSupplierProfile(t *testing.T) { if reply2 != utils.OK { t.Errorf("Error: %+v", reply2) } - if err := tFIdxRpc.Call("ApierV1.RemSupplierProfile", + if err := tFIdxRpc.Call("ApierV1.RemoveSupplierProfile", &utils.TenantID{Tenant: tenant, ID: "TEST_PROFILE1"}, &resp); err != nil { t.Error(err) } else if resp != utils.OK { t.Error("Unexpected reply returned", resp) } - if err := tFIdxRpc.Call("ApierV1.RemSupplierProfile", + if err := tFIdxRpc.Call("ApierV1.RemoveSupplierProfile", &utils.TenantID{Tenant: tenant, ID: "TEST_PROFILE2"}, &resp); err != nil { t.Error(err) } else if resp != utils.OK { diff --git a/apier/v1/suppliers.go b/apier/v1/suppliers.go index 270781a15..bc7f381a2 100644 --- a/apier/v1/suppliers.go +++ b/apier/v1/suppliers.go @@ -51,8 +51,8 @@ func (apierV1 *ApierV1) SetSupplierProfile(spp *engine.SupplierProfile, reply *s return nil } -//RemSupplierProfile remove a specific Supplier configuration -func (apierV1 *ApierV1) RemSupplierProfile(arg utils.TenantID, reply *string) error { +//RemoveSupplierProfile remove a specific Supplier configuration +func (apierV1 *ApierV1) RemoveSupplierProfile(arg utils.TenantID, reply *string) error { if missing := utils.MissingStructFields(&arg, []string{"Tenant", "ID"}); len(missing) != 0 { //Params missing return utils.NewErrMandatoryIeMissing(missing...) } diff --git a/apier/v1/suppliers_it_test.go b/apier/v1/suppliers_it_test.go index ca53e3355..d25a84584 100644 --- a/apier/v1/suppliers_it_test.go +++ b/apier/v1/suppliers_it_test.go @@ -357,7 +357,7 @@ func testV1SplSUpdateSupplierProfiles(t *testing.T) { func testV1SplSRemSupplierProfiles(t *testing.T) { var resp string - if err := splSv1Rpc.Call("ApierV1.RemSupplierProfile", &utils.TenantID{Tenant: "cgrates.org", ID: "TEST_PROFILE1"}, &resp); err != nil { + if err := splSv1Rpc.Call("ApierV1.RemoveSupplierProfile", &utils.TenantID{Tenant: "cgrates.org", ID: "TEST_PROFILE1"}, &resp); err != nil { t.Error(err) } else if resp != utils.OK { t.Error("Unexpected reply returned", resp) diff --git a/console/supplier_remove.go b/console/supplier_remove.go index 0659c55f5..08b749c9e 100644 --- a/console/supplier_remove.go +++ b/console/supplier_remove.go @@ -23,7 +23,7 @@ import "github.com/cgrates/cgrates/utils" func init() { c := &CmdRemoveSupplier{ name: "supplier_remove", - rpcMethod: "ApierV1.RemSupplierProfile", + rpcMethod: "ApierV1.RemoveSupplierProfile", rpcParams: &utils.TenantID{}, } commands[c.Name()] = c diff --git a/engine/storage_mongo_datadb.go b/engine/storage_mongo_datadb.go index a86142141..93323263f 100755 --- a/engine/storage_mongo_datadb.go +++ b/engine/storage_mongo_datadb.go @@ -2253,6 +2253,7 @@ func (ms *MongoStorage) SetThresholdProfileDrv(tp *ThresholdProfile) (err error) func (ms *MongoStorage) RemThresholdProfileDrv(tenant, id string) (err error) { session, col := ms.conn(colTps) defer session.Close() + utils.Logger.Debug(fmt.Sprintf("dbKey %+v", session)) err = col.Remove(bson.M{"tenant": tenant, "id": id}) if err != nil { return err