coverage tests at engine

This commit is contained in:
gezimbll
2022-11-11 19:09:13 -05:00
committed by Dan Christian Bogos
parent 4305c505a8
commit e7520002eb
7 changed files with 393 additions and 1 deletions

View File

@@ -20,6 +20,7 @@ package engine
import (
"fmt"
"reflect"
"testing"
"time"
@@ -215,3 +216,27 @@ func TestCDRSV1V1ProcessExternalCDRNoTenant(t *testing.T) {
t.Error(err)
}
}
func TestArgV1ProcessClone(t *testing.T) {
attr := &ArgV1ProcessEvent{
Flags: []string{"flg,flg2,flg3"},
CGREvent: utils.CGREvent{
ID: "TestBiRPCv1AuthorizeEventNoTenant",
Time: utils.TimePointer(time.Date(2016, time.January, 5, 18, 30, 49, 0, time.UTC)),
Event: map[string]interface{}{
"Account": "1002",
"Category": "call",
"Destination": "1003",
"OriginHost": "local",
"OriginID": "123456",
"ToR": "*voice",
"Usage": "10s",
},
},
clnb: true,
}
if val := attr.Clone(); reflect.DeepEqual(attr, val) {
t.Errorf("expected %v,received %v", utils.ToJSON(val), utils.ToJSON(attr))
}
}