Fixes on integration tests

This commit is contained in:
gezimbll
2023-06-05 10:14:51 -04:00
committed by Dan Christian Bogos
parent 35fee5ccdf
commit 3fbb546c83
3 changed files with 14 additions and 14 deletions

View File

@@ -913,7 +913,7 @@ func testV2CDRsRerate(t *testing.T) {
}
args := &engine.ArgV1ProcessEvent{
Flags: []string{utils.MetaRerate},
Flags: []string{utils.MetaRALs},
CGREvent: utils.CGREvent{
Tenant: "cgrates.org",
Event: map[string]any{

View File

@@ -410,7 +410,7 @@ func testDspRplDispatcherProfile(t *testing.T) {
allEngine.stopEngine(t)
// Get DispatcherProfile
if err := dispEngine.RPC.Call(utils.ReplicatorSv1GetDispatcherProfile, argsDispatcherProfile, &reply); err == nil || err.Error() != utils.ErrNotFound.Error() {
if err := dispEngine.RPC.Call(utils.ReplicatorSv1GetDispatcherProfile, argsDispatcherProfile, &reply); err == nil || err.Error() != utils.ErrDSPProfileNotFound.Error() {
t.Errorf("Expecting: %+v, received: %+v, ", utils.ErrNotFound, err)
}
@@ -425,7 +425,7 @@ func testDspRplDispatcherProfile(t *testing.T) {
}
// Get DispatcherProfile
if err := dispEngine.RPC.Call(utils.ReplicatorSv1GetDispatcherProfile, argsDispatcherProfile, &reply); err == nil || err.Error() != utils.ErrNotFound.Error() {
if err := dispEngine.RPC.Call(utils.ReplicatorSv1GetDispatcherProfile, argsDispatcherProfile, &reply); err == nil || err.Error() != utils.ErrDSPProfileNotFound.Error() {
t.Errorf("Expecting: %+v, received: %+v, ", utils.ErrNotFound, err)
}
}
@@ -471,7 +471,7 @@ func testDspRplDispatcherHost(t *testing.T) {
allEngine.stopEngine(t)
// Get DispatcherHost
if err := dispEngine.RPC.Call(utils.ReplicatorSv1GetDispatcherHost, argsDispatcherHost, &reply); err == nil || err.Error() != utils.ErrNotFound.Error() {
if err := dispEngine.RPC.Call(utils.ReplicatorSv1GetDispatcherHost, argsDispatcherHost, &reply); err == nil || err.Error() != utils.ErrDSPHostNotFound.Error() {
t.Errorf("Expecting: %+v, received: %+v, ", utils.ErrNotFound, err)
}
@@ -486,7 +486,7 @@ func testDspRplDispatcherHost(t *testing.T) {
}
// Get DispatcherHost
if err := dispEngine.RPC.Call(utils.ReplicatorSv1GetDispatcherHost, argsDispatcherHost, &reply); err == nil || err.Error() != utils.ErrNotFound.Error() {
if err := dispEngine.RPC.Call(utils.ReplicatorSv1GetDispatcherHost, argsDispatcherHost, &reply); err == nil || err.Error() != utils.ErrDSPHostNotFound.Error() {
t.Errorf("Expecting: %+v, received: %+v, ", utils.ErrNotFound, err)
}
}

View File

@@ -1364,11 +1364,11 @@ func TestErsOnEvictedDumpToJSONInvalidPath(t *testing.T) {
log.SetOutput(os.Stderr)
}()
dirPath := "/tmp/TestErsOnEvictedDumpToJSON"
err := os.MkdirAll(dirPath, 0755)
if err != nil {
t.Error(err)
}
// dirPath := "/tmp/TestErsOnEvictedDumpToJSON"
// err := os.MkdirAll(dirPath, 0755)
// if err != nil {
// t.Error(err)
// }
value := &erEvents{
events: []*utils.CGREvent{
{
@@ -1393,7 +1393,7 @@ func TestErsOnEvictedDumpToJSONInvalidPath(t *testing.T) {
Type: utils.MetaNone,
Opts: &config.EventReaderOpts{
PartialCacheAction: utils.StringPointer(utils.MetaDumpToJSON),
PartialPath: utils.StringPointer(dirPath),
PartialPath: utils.StringPointer("invalid path"),
PartialOrderField: utils.StringPointer("2"),
},
},
@@ -1416,9 +1416,9 @@ func TestErsOnEvictedDumpToJSONInvalidPath(t *testing.T) {
t.Errorf("expected <%+v> to be included in: <%+v>", expLog, rcvLog)
}
utils.Logger.SetLogLevel(0)
if err := os.RemoveAll(dirPath); err != nil {
t.Error(err)
}
// if err := os.RemoveAll(dirPath); err != nil {
// t.Error(err)
// }
}
func TestErsOnEvictedDumpToJSONEncodeErr(t *testing.T) {