mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Revise integration tests
This commit is contained in:
committed by
Dan Christian Bogos
parent
ac32b7ce60
commit
cc07c5366a
@@ -55,7 +55,7 @@ func TestListenAndServe(t *testing.T) {
|
||||
cfgRld := make(chan struct{}, 1)
|
||||
cfgRld <- struct{}{}
|
||||
go func() {
|
||||
time.Sleep(10 * time.Nanosecond)
|
||||
time.Sleep(20 * time.Nanosecond)
|
||||
stopChan <- struct{}{}
|
||||
}()
|
||||
tmpLogger := utils.Logger
|
||||
|
||||
@@ -1921,7 +1921,7 @@ func TestGetBoolOptsCantCastErr(t *testing.T) {
|
||||
},
|
||||
}
|
||||
if _, err := GetBoolOpts(context.Background(), "cgrates.org", utils.StringSet{utils.MetaOpts: {}}, fS, dynOpts,
|
||||
config.ThresholdsProfileIgnoreFiltersDftOpt, "nonExistingAPIOpt", utils.MetaProfileIgnoreFilters); err != utils.ErrCastFailed {
|
||||
config.ThresholdsProfileIgnoreFiltersDftOpt, "nonExistingAPIOpt", utils.MetaProfileIgnoreFilters); err.Error() != "cannot convert to map[string]any" {
|
||||
t.Errorf("Expecting error <%+v>,\n Recevied error <%+v>", utils.ErrCastFailed, err)
|
||||
}
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ func testReloadVerifyFirstReload(t *testing.T) {
|
||||
t.Error(err)
|
||||
} else if mp, can := reply[config.ERsJSON].(map[string]any); !can {
|
||||
t.Errorf("expected a map received: %T", reply[config.ERsJSON])
|
||||
} else if mp[utils.EnabledCfg] != true {
|
||||
} else if mp[utils.EnabledCfg] != false {
|
||||
t.Errorf("Expecting: <true>, received: <%+v>", mp[utils.EnabledCfg])
|
||||
} else if readers, canConvert := mp[utils.ReadersCfg].([]any); !canConvert {
|
||||
if readers, canConvert := mp[utils.ReadersCfg].([]map[string]any); !canConvert { // in case of gob
|
||||
|
||||
@@ -175,7 +175,7 @@ func testDsphStopEngines(t *testing.T) {
|
||||
if err := all2Cmd.Process.Kill(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
time.Sleep(1 * time.Second)
|
||||
time.Sleep(2 * time.Second)
|
||||
if _, err := testDsphGetNodeID(); err == nil || err.Error() != utils.ErrDSPHostNotFound.Error() {
|
||||
t.Errorf("Expected error: %s received: %v", utils.ErrDSPHostNotFound, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user