mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Session test fixup
This commit is contained in:
@@ -31,7 +31,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
var cfg *config.CGRConfig
|
||||
var cfg *config.CGRConfig // Share the configuration with the rest of the package
|
||||
|
||||
// The freeswitch session manager type holding a buffer for the network connection
|
||||
// and the active sessions
|
||||
|
||||
@@ -20,6 +20,7 @@ package sessionmanager
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"github.com/cgrates/cgrates/config"
|
||||
// "time"
|
||||
)
|
||||
|
||||
@@ -64,6 +65,12 @@ var (
|
||||
}*/
|
||||
|
||||
func TestSessionNilSession(t *testing.T) {
|
||||
cfgTestPath := "../config/test_data.txt"
|
||||
var errCfg error
|
||||
cfg,errCfg = config.NewCGRConfig(&cfgTestPath) // Needed here to avoid nil on cfg variable
|
||||
if errCfg!= nil {
|
||||
t.Errorf("Cannot get configuration %v",errCfg)
|
||||
}
|
||||
newEvent := new(FSEvent).New("")
|
||||
sm := &FSSessionManager{}
|
||||
s := NewSession(newEvent, sm)
|
||||
|
||||
Reference in New Issue
Block a user