mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-15 21:29:52 +05:00
Continuing tests for services
This commit is contained in:
committed by
Dan Christian Bogos
parent
a97fd0ed22
commit
e62fd7b28b
@@ -78,6 +78,10 @@ func TestSIPAgentReload(t *testing.T) {
|
||||
if !srv.IsRunning() {
|
||||
t.Errorf("Expected service to be running")
|
||||
}
|
||||
srvStart := srv.Start()
|
||||
if srvStart != utils.ErrServiceAlreadyRunning {
|
||||
t.Errorf("\nExpecting <%+v>,\n Received <%+v>", utils.ErrServiceAlreadyRunning, srvStart)
|
||||
}
|
||||
err := srv.Reload()
|
||||
if err != nil {
|
||||
t.Errorf("\nExpecting <err>,\n Received <%+v>", err)
|
||||
|
||||
39
services/stordb_it_test.go
Normal file
39
services/stordb_it_test.go
Normal file
@@ -0,0 +1,39 @@
|
||||
// +build integration
|
||||
|
||||
/*
|
||||
Real-time Online/Offline Charging System (OCS) for Telecom & ISP environments
|
||||
Copyright (C) ITsysCOM GmbH
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
package services
|
||||
|
||||
import (
|
||||
"sync"
|
||||
"testing"
|
||||
|
||||
"github.com/cgrates/cgrates/config"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
|
||||
//TestStorDBServiceCoverage for cover testing
|
||||
func TestStorDBServiceCoverage(t *testing.T) {
|
||||
cfg := config.NewDefaultCGRConfig()
|
||||
srvDep := map[string]*sync.WaitGroup{utils.DataDB: new(sync.WaitGroup)}
|
||||
srv := NewStorDBService(cfg, srvDep)
|
||||
if srv.IsRunning() {
|
||||
t.Errorf("Expected service to be running")
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user