diff --git a/sessionmanager/fssessionmanager.go b/sessionmanager/fssessionmanager.go index 7be37dad2..a88bb8e45 100644 --- a/sessionmanager/fssessionmanager.go +++ b/sessionmanager/fssessionmanager.go @@ -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 diff --git a/sessionmanager/session_test.go b/sessionmanager/session_test.go index 9891a2fdb..fd831f50a 100644 --- a/sessionmanager/session_test.go +++ b/sessionmanager/session_test.go @@ -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)