Remove unneeded verification and refactor test

This commit is contained in:
ionutboangiu
2021-09-10 17:47:42 +03:00
committed by Dan Christian Bogos
parent 6062cdda21
commit 4c71c77cdb
2 changed files with 2 additions and 5 deletions

View File

@@ -48,7 +48,7 @@ var (
testAttributeSStartEngine,
testAttributeSRPCConn,
testGetAttributeProfileBeforeSet,
//testAttributeSLoadFromFolder,
testAttributeSLoadFromFolder,
testAttributeSetAttributeProfile,
testAttributeGetAttributeIDs,
testAttributeGetAttributeCount,
@@ -388,7 +388,7 @@ func testAttributeSGetAttributeForEventMissingEvent(t *testing.T) {
var rplyEv engine.AttrSProcessEventReply
if err := attrSRPC.Call(context.Background(), utils.AttributeSv1ProcessEvent,
nil, &rplyEv); err == nil ||
err.Error() != "MANDATORY_IE_MISSING: [CGREvent]" {
err.Error() != utils.ErrNotFound.Error() {
t.Error(err)
}
}

View File

@@ -230,9 +230,6 @@ func (alS *AttributeService) V1GetAttributeForEvent(ctx *context.Context, args *
// V1ProcessEvent proccess the event and returns the result
func (alS *AttributeService) V1ProcessEvent(ctx *context.Context, args *utils.CGREvent,
reply *AttrSProcessEventReply) (err error) {
if args == nil {
return utils.NewErrMandatoryIeMissing(utils.CGREventString)
}
tnt := args.Tenant
if tnt == utils.EmptyString {
tnt = alS.cgrcfg.GeneralCfg().DefaultTenant