mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-12 02:26:26 +05:00
Revert some changes in apier/v1/sessions_it_test.go
This commit is contained in:
committed by
Dan Christian Bogos
parent
801d890d84
commit
08e77bb434
@@ -40,10 +40,9 @@ var (
|
||||
sSv1Cfg *config.CGRConfig
|
||||
sSv1BiRpc *rpc2.Client
|
||||
sSApierRpc *rpc.Client
|
||||
discEvChan = make(chan *utils.AttrDisconnectSession)
|
||||
)
|
||||
|
||||
var discEvChan = make(chan *utils.AttrDisconnectSession, 1)
|
||||
|
||||
func handleDisconnectSession(clnt *rpc2.Client,
|
||||
args *utils.AttrDisconnectSession, reply *string) error {
|
||||
discEvChan <- args
|
||||
@@ -53,6 +52,11 @@ func handleDisconnectSession(clnt *rpc2.Client,
|
||||
return nil
|
||||
}
|
||||
|
||||
func handleGetSessionIDs(clnt *rpc2.Client,
|
||||
ignParam string, sessionIDs *[]*sessions.SessionID) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func TestSSv1ItInitCfg(t *testing.T) {
|
||||
var err error
|
||||
sSv1CfgPath = path.Join(*dataDir, "conf", "samples", "sessions")
|
||||
@@ -84,9 +88,15 @@ func TestSSv1ItStartEngine(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestSSv1ItRpcConn(t *testing.T) {
|
||||
clntHandlers := map[string]interface{}{utils.SessionSv1DisconnectSession: handleDisconnectSession}
|
||||
dummyClnt, err := utils.NewBiJSONrpcClient(sSv1Cfg.SessionSCfg().ListenBijson,
|
||||
clntHandlers)
|
||||
nil)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
clntHandlers := map[string]interface{}{
|
||||
utils.SessionSv1DisconnectSession: handleDisconnectSession,
|
||||
utils.SessionSv1GetActiveSessionIDs: handleGetSessionIDs,
|
||||
}
|
||||
if sSv1BiRpc, err = utils.NewBiJSONrpcClient(sSv1Cfg.SessionSCfg().ListenBijson,
|
||||
clntHandlers); err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
Reference in New Issue
Block a user