Session test fixup

This commit is contained in:
DanB
2013-04-08 19:50:13 +02:00
parent 2444cabeea
commit 3e7eb2ea6b
2 changed files with 8 additions and 1 deletions

View File

@@ -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

View File

@@ -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)