fixed session manager tests

This commit is contained in:
Radu Ioan Fericean
2015-11-27 15:12:16 +02:00
parent ffdd960d39
commit 28853d935d
3 changed files with 7 additions and 6 deletions

View File

@@ -153,7 +153,7 @@ func startRater(internalRaterChan chan *engine.Responder, internalBalancerChan c
exitChan <- true
return
}
engine.SetHistoryScribe(scribeServer) // ToDo: replace package sharing with connection based one
engine.SetHistoryScribe(scribeServer)
}()
}
@@ -178,7 +178,7 @@ func startRater(internalRaterChan chan *engine.Responder, internalBalancerChan c
exitChan <- true
return
}
engine.SetPubSub(pubSubServer) // ToDo: replace package sharing with connection based one
engine.SetPubSub(pubSubServer)
}()
}
@@ -203,7 +203,7 @@ func startRater(internalRaterChan chan *engine.Responder, internalBalancerChan c
exitChan <- true
return
}
engine.SetAliasService(aliasesServer) // ToDo: replace package sharing with connection based one
engine.SetAliasService(aliasesServer)
}()
}

View File

@@ -92,7 +92,7 @@ func (mc *MockRpcClient) Call(methodName string, arg interface{}, reply interfac
func TestSessionRefund(t *testing.T) {
mc := &MockRpcClient{}
s := &Session{sessionManager: &FSSessionManager{rater: mc}}
s := &Session{sessionManager: &FSSessionManager{rater: mc, timezone: time.UTC.String()}, eventStart: FSEvent{SETUP_TIME: time.Now().Format(time.RFC3339)}}
ts := &engine.TimeSpan{
TimeStart: time.Date(2015, 6, 10, 14, 7, 0, 0, time.UTC),
TimeEnd: time.Date(2015, 6, 10, 14, 7, 30, 0, time.UTC),
@@ -112,7 +112,7 @@ func TestSessionRefund(t *testing.T) {
func TestSessionRefundAll(t *testing.T) {
mc := &MockRpcClient{}
s := &Session{sessionManager: &FSSessionManager{rater: mc}}
s := &Session{sessionManager: &FSSessionManager{rater: mc, timezone: time.UTC.String()}, eventStart: FSEvent{SETUP_TIME: time.Now().Format(time.RFC3339)}}
ts := &engine.TimeSpan{
TimeStart: time.Date(2015, 6, 10, 14, 7, 0, 0, time.UTC),
TimeEnd: time.Date(2015, 6, 10, 14, 7, 30, 0, time.UTC),
@@ -132,7 +132,7 @@ func TestSessionRefundAll(t *testing.T) {
func TestSessionRefundManyAll(t *testing.T) {
mc := &MockRpcClient{}
s := &Session{sessionManager: &FSSessionManager{rater: mc}}
s := &Session{sessionManager: &FSSessionManager{rater: mc, timezone: time.UTC.String()}, eventStart: FSEvent{SETUP_TIME: time.Now().Format(time.RFC3339)}}
ts1 := &engine.TimeSpan{
TimeStart: time.Date(2015, 6, 10, 14, 7, 0, 0, time.UTC),
TimeEnd: time.Date(2015, 6, 10, 14, 7, 30, 0, time.UTC),

View File

@@ -3,6 +3,7 @@
go test -i github.com/cgrates/cgrates/apier/v1
go test -i github.com/cgrates/cgrates/apier/v2
go test -i github.com/cgrates/cgrates/engine
go test -i github.com/cgrates/cgrates/general_tests
go test -i github.com/cgrates/cgrates/sessionmanager
go test -i github.com/cgrates/cgrates/config
go test -i github.com/cgrates/cgrates/cmd/cgr-engine