diff --git a/cmd/cgr-engine/rater.go b/cmd/cgr-engine/rater.go index edef08c05..83aa71506 100644 --- a/cmd/cgr-engine/rater.go +++ b/cmd/cgr-engine/rater.go @@ -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) }() } diff --git a/sessionmanager/session_test.go b/sessionmanager/session_test.go index 7b1c10292..e01d8c74d 100644 --- a/sessionmanager/session_test.go +++ b/sessionmanager/session_test.go @@ -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), diff --git a/test.sh b/test.sh index 0c62795fc..e0c162a50 100755 --- a/test.sh +++ b/test.sh @@ -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