mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Tests in services
This commit is contained in:
committed by
Dan Christian Bogos
parent
219cf8a199
commit
570e909aae
@@ -74,5 +74,16 @@ func TestCoreSCoverage(t *testing.T) {
|
||||
if getCoreS == nil {
|
||||
t.Errorf("\nExpecting not <nil>,\n Received <%+v>", getCoreS)
|
||||
}
|
||||
//populates connChan with something in order to call the shutdown function
|
||||
chS := engine.NewCacheS(cfg, nil, nil)
|
||||
srv.connChan <- chS
|
||||
srv.stopChan = make(chan struct{})
|
||||
getShut := srv.Shutdown()
|
||||
if getShut != nil {
|
||||
t.Errorf("\nExpecting not <nil>,\n Received <%+v>", getShut)
|
||||
}
|
||||
if srv.IsRunning() {
|
||||
t.Errorf("Expected service to be down")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ func TestStorDBServiceCoverage(t *testing.T) {
|
||||
Password: "test_pass",
|
||||
}
|
||||
err2 = srv.Reload()
|
||||
if err2 != nil {
|
||||
if err2 == nil {
|
||||
t.Errorf("\nExpecting <Error 1045: Access denied for user 'cgrates'@'localhost' (using password: NO)>,\n Received <%+v>", err2)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user