Fixed redunduncies

This commit is contained in:
andronache
2021-04-01 17:01:37 +03:00
committed by Dan Christian Bogos
parent d88f112f2e
commit ef25dfacb5
3 changed files with 10 additions and 10 deletions

View File

@@ -438,8 +438,8 @@ func testConfigStartEngineFromHTTP(t *testing.T) {
if err != nil {
t.Error(err)
}
engine := exec.Command(enginePath, "-config_path", "http://127.0.0.1:3080/configs/tutmysql/cgrates.json")
if err := engine.Start(); err != nil {
eng := exec.Command(enginePath, "-config_path", "http://127.0.0.1:3080/configs/tutmysql/cgrates.json")
if err := eng.Start(); err != nil {
t.Error(err)
}
fib := utils.Fib()

View File

@@ -90,8 +90,8 @@ func testPreloadITStartEngine(t *testing.T) {
if err != nil {
t.Error(err)
}
engine := exec.Command(enginePath, "-config_path", preloadCfgPath, "-preload", "CustomLoader")
if err := engine.Start(); err != nil {
eng := exec.Command(enginePath, "-config_path", preloadCfgPath, "-preload", "CustomLoader")
if err := eng.Start(); err != nil {
t.Error(err)
}
fib := utils.Fib()

View File

@@ -405,7 +405,7 @@ func testSessionSv1ItAuthNotFoundThreshold(t *testing.T) {
t.Error(err)
}
if rply.ThresholdIDs != nil {
t.Errorf("Expecting: nil, received: %s",
t.Errorf("Expecting: nil, received: %+v",
rply.ThresholdIDs)
}
if rply.StatQueueIDs != nil && len(*rply.StatQueueIDs) != 1 && (*rply.StatQueueIDs)[0] != "Stat_2" {
@@ -449,7 +449,7 @@ func testSessionSv1ItInitNotFoundThreshold(t *testing.T) {
1024, rply.MaxUsage)
}
if rply.ThresholdIDs != nil {
t.Errorf("Expecting: nil, received: %s",
t.Errorf("Expecting: nil, received: %+v",
rply.ThresholdIDs)
}
if rply.StatQueueIDs != nil && len(*rply.StatQueueIDs) != 1 && (*rply.StatQueueIDs)[0] != "Stat_2" {
@@ -537,11 +537,11 @@ func testSessionSv1ItAuthNotFoundThresholdAndStats(t *testing.T) {
t.Error(err)
}
if rply.ThresholdIDs != nil {
t.Errorf("Expecting: nil, received: %s",
t.Errorf("Expecting: nil, received: %+v",
rply.ThresholdIDs)
}
if rply.StatQueueIDs != nil {
t.Errorf("Expecting: nil, received: %s",
t.Errorf("Expecting: nil, received: %+v",
rply.StatQueueIDs)
}
}
@@ -582,11 +582,11 @@ func testSessionSv1ItInitNotFoundThresholdAndStats(t *testing.T) {
1024, rply.MaxUsage)
}
if rply.ThresholdIDs != nil {
t.Errorf("Expecting: nil, received: %s",
t.Errorf("Expecting: nil, received: %+v",
rply.ThresholdIDs)
}
if rply.StatQueueIDs != nil {
t.Errorf("Expecting: nil, received: %s",
t.Errorf("Expecting: nil, received: %+v",
rply.StatQueueIDs)
}