Updated config_default

This commit is contained in:
Trial97
2019-12-12 08:29:05 +02:00
parent e0fc97c99a
commit b1fdfea009
5 changed files with 43 additions and 50 deletions

View File

@@ -473,46 +473,46 @@ func TestCDRParseFieldValue(t *testing.T) {
}
}
func TestCdrClone(t * testing.T){
func TestCdrClone(t *testing.T) {
cdr := &CDR{}
eOut := &CDR{}
if rcv := cdr.Clone(); !reflect.DeepEqual(rcv,eOut) {
t.Errorf("Expecting: %+v, received: %+v",eOut,rcv)
if rcv := cdr.Clone(); !reflect.DeepEqual(rcv, eOut) {
t.Errorf("Expecting: %+v, received: %+v", eOut, rcv)
}
cdr = &CDR{
CGRID: "CGRID_test",
OrderID: 18,
CGRID: "CGRID_test",
OrderID: 18,
SetupTime: time.Date(2020, time.April, 18, 23, 0, 4, 0, time.UTC),
Usage: time.Duration(10),
Usage: time.Duration(10),
ExtraFields: map[string]string{
"test1":"_test1_",
"test2":"_test2_",
"test1": "_test1_",
"test2": "_test2_",
},
Partial: true,
Cost: 0.74,
Cost: 0.74,
CostDetails: &EventCost{
CGRID: "EventCost_CGRID",
Cost: utils.Float64Pointer(0.74),
Cost: utils.Float64Pointer(0.74),
},
}
eOut = &CDR{
CGRID: "CGRID_test",
OrderID: 18,
CGRID: "CGRID_test",
OrderID: 18,
SetupTime: time.Date(2020, time.April, 18, 23, 0, 4, 0, time.UTC),
Usage: time.Duration(10),
Usage: time.Duration(10),
ExtraFields: map[string]string{
"test1":"_test1_",
"test2":"_test2_",
"test1": "_test1_",
"test2": "_test2_",
},
Partial: true,
Cost: 0.74,
Cost: 0.74,
CostDetails: &EventCost{
CGRID: "EventCost_CGRID",
Cost: utils.Float64Pointer(0.74),
Cost: utils.Float64Pointer(0.74),
},
}
if rcv := cdr.Clone(); !reflect.DeepEqual(rcv,eOut) {
t.Errorf("Expecting: %+v,\n received: %+v",eOut,rcv)
if rcv := cdr.Clone(); !reflect.DeepEqual(rcv, eOut) {
t.Errorf("Expecting: %+v,\n received: %+v", eOut, rcv)
}
}

View File

@@ -192,13 +192,13 @@ func (ec *EventCost) Clone() (cln *EventCost) {
if ec.AccountSummary != nil {
cln.AccountSummary = ec.AccountSummary.Clone()
}
if ec.Rating != nil {
if ec.Rating != nil {
cln.Rating = ec.Rating.Clone()
}
if ec.Accounting != nil {
if ec.Accounting != nil {
cln.Accounting = ec.Accounting.Clone()
}
if ec.RatingFilters != nil {
if ec.RatingFilters != nil {
cln.RatingFilters = ec.RatingFilters.Clone()
}
if ec.Rates != nil {