From 4c71c77cdbff699725f20179ac147e472e566b93 Mon Sep 17 00:00:00 2001 From: ionutboangiu Date: Fri, 10 Sep 2021 17:47:42 +0300 Subject: [PATCH] Remove unneeded verification and refactor test --- apis/attributes_it_test.go | 4 ++-- engine/attributes.go | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/apis/attributes_it_test.go b/apis/attributes_it_test.go index 1f3821753..abcc56388 100644 --- a/apis/attributes_it_test.go +++ b/apis/attributes_it_test.go @@ -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) } } diff --git a/engine/attributes.go b/engine/attributes.go index 2ec2d89c6..7f8dfdb4a 100644 --- a/engine/attributes.go +++ b/engine/attributes.go @@ -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