mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
fixed session manager tests
This commit is contained in:
@@ -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)
|
||||
}()
|
||||
}
|
||||
|
||||
|
||||
@@ -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),
|
||||
|
||||
1
test.sh
1
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
|
||||
|
||||
Reference in New Issue
Block a user