From 3e7eb2ea6be636c1f8b3c51adecbe2e30bcf6e83 Mon Sep 17 00:00:00 2001 From: DanB Date: Mon, 8 Apr 2013 19:50:13 +0200 Subject: [PATCH] Session test fixup --- sessionmanager/fssessionmanager.go | 2 +- sessionmanager/session_test.go | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) 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)