mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-17 14:19:54 +05:00
Fix integration tests
This commit is contained in:
committed by
Dan Christian Bogos
parent
8a4c982af6
commit
941531039e
@@ -345,7 +345,7 @@ func testChargerSProcessEvent(t *testing.T) {
|
||||
}
|
||||
if err := chargerRPC.Call(utils.ChargerSv1ProcessEvent, chargerEvent[0], &result); err != nil {
|
||||
t.Error(err)
|
||||
} else if !reflect.DeepEqual(result, processedEv) {
|
||||
} else if utils.ToJSON(result) != utils.ToJSON(processedEv) {
|
||||
t.Errorf("Expecting : %s, received: %s", utils.ToJSON(processedEv), utils.ToJSON(result))
|
||||
}
|
||||
result = []*engine.ChrgSProcessEventReply{}
|
||||
@@ -375,7 +375,7 @@ func testChargerSProcessEvent(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
sort.Strings(result[0].AlteredFields)
|
||||
if !reflect.DeepEqual(result, processedEv) {
|
||||
if utils.ToJSON(result) != utils.ToJSON(processedEv) {
|
||||
t.Errorf("Expecting : %s, received: %s", utils.ToJSON(processedEv), utils.ToJSON(result))
|
||||
}
|
||||
|
||||
@@ -384,7 +384,7 @@ func testChargerSProcessEvent(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
sort.Strings(result[0].AlteredFields)
|
||||
if !reflect.DeepEqual(result, processedEv) {
|
||||
if utils.ToJSON(result) != utils.ToJSON(processedEv) {
|
||||
t.Errorf("Expecting : %s, received: %s", utils.ToJSON(processedEv), utils.ToJSON(result))
|
||||
}
|
||||
}
|
||||
@@ -625,7 +625,7 @@ func testChargerSProccessEventWithProcceSRunS(t *testing.T) {
|
||||
var result2 []*engine.ChrgSProcessEventReply
|
||||
if err := chargerRPC.Call(utils.ChargerSv1ProcessEvent, cgrEv, &result2); err != nil {
|
||||
t.Error(err)
|
||||
} else if !reflect.DeepEqual(result2, processedEv) {
|
||||
} else if utils.ToJSON(result2) != utils.ToJSON(processedEv) {
|
||||
t.Errorf("Expecting : %s, received: %s", utils.ToJSON(processedEv), utils.ToJSON(result2))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -334,7 +334,6 @@ func testCGRConfigReloadSupplierS(t *testing.T) {
|
||||
Context: utils.MetaRoutes,
|
||||
IgnoreErrors: false,
|
||||
MaxCost: utils.EmptyString,
|
||||
ProfileCount: 1,
|
||||
},
|
||||
}
|
||||
if !reflect.DeepEqual(expAttr, cfg.RouteSCfg()) {
|
||||
|
||||
@@ -1181,7 +1181,6 @@ func TestDfRouteSJsonCfg(t *testing.T) {
|
||||
Context: utils.StringPointer(utils.MetaRoutes),
|
||||
IgnoreErrors: utils.BoolPointer(false),
|
||||
MaxCost: utils.EmptyString,
|
||||
ProfileCount: utils.IntPointer(1),
|
||||
},
|
||||
}
|
||||
dfCgrJSONCfg, err := NewCgrJsonCfgFromBytes([]byte(CGRATES_CFG_JSON))
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -54,7 +54,6 @@ func TestRouteSCfgloadFromJsonCfg(t *testing.T) {
|
||||
Context: utils.MetaRoutes,
|
||||
IgnoreErrors: false,
|
||||
MaxCost: utils.EmptyString,
|
||||
ProfileCount: 1,
|
||||
},
|
||||
}
|
||||
jsonCfg := NewDefaultCGRConfig()
|
||||
@@ -82,7 +81,6 @@ func TestRouteSCfgAsMapInterface(t *testing.T) {
|
||||
utils.DefaultRatioCfg: 1,
|
||||
utils.OptsCfg: map[string]interface{}{
|
||||
utils.OptsContext: utils.MetaRoutes,
|
||||
utils.MetaProfileCountCfg: 1,
|
||||
utils.MetaIgnoreErrorsCfg: false,
|
||||
utils.MetaMaxCostCfg: utils.EmptyString,
|
||||
},
|
||||
@@ -124,7 +122,6 @@ func TestRouteSCfgAsMapInterface1(t *testing.T) {
|
||||
utils.DefaultRatioCfg: 2,
|
||||
utils.OptsCfg: map[string]interface{}{
|
||||
utils.OptsContext: utils.MetaRoutes,
|
||||
utils.MetaProfileCountCfg: 1,
|
||||
utils.MetaIgnoreErrorsCfg: false,
|
||||
utils.MetaMaxCostCfg: utils.EmptyString,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user