[RICPLT-2146] Remove E2Sessions......
[ric-plt/e2mgr.git] / E2Manager / handlers / rmrmsghandlers / x2_reset_response_handler_test.go
index 513596f..0134399 100644 (file)
@@ -22,7 +22,6 @@ import (
        "e2mgr/mocks"
        "e2mgr/models"
        "e2mgr/rmrCgo"
-       "e2mgr/sessions"
        "e2mgr/tests"
        "gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/common"
        "gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/entities"
@@ -46,10 +45,7 @@ func TestX2ResetResponseSuccess(t *testing.T) {
        }
 
        h := NewX2ResetResponseHandler(rnibReaderProvider)
-       e2Sessions := make(sessions.E2Sessions)
-       //xaction := []byte(fmt.Sprintf("%32s", "1234"))
        xaction := []byte("RanName")
-       e2Sessions[string(xaction)] = sessions.E2SessionDetails{SessionStart: time.Now()}
        mBuf := rmrCgo.NewMBuf(tests.MessageType, len(payload),"RanName", &payload, &xaction)
        notificationRequest := models.NotificationRequest{RanName: mBuf.Meid, Len: mBuf.Len, Payload: *mBuf.Payload,
                StartTime: time.Now(), TransactionId: string(xaction)}
@@ -59,7 +55,7 @@ func TestX2ResetResponseSuccess(t *testing.T) {
        var rnibErr error
        readerMock.On("GetNodeb", mBuf.Meid).Return(nb, rnibErr)
 
-       h.Handle(log,e2Sessions, &notificationRequest, messageChannel)
+       h.Handle(log, &notificationRequest, messageChannel)
 
        //TODO:Nothing to verify
 }
@@ -76,10 +72,7 @@ func TestX2ResetResponseReaderFailure(t *testing.T) {
        }
 
        h := NewX2ResetResponseHandler(rnibReaderProvider)
-       e2Sessions := make(sessions.E2Sessions)
-       //xaction = []byte(fmt.Sprintf("%32s", "1234"))
        xaction := []byte("RanName")
-       e2Sessions[string(xaction)] = sessions.E2SessionDetails{SessionStart: time.Now()}
        mBuf := rmrCgo.NewMBuf(tests.MessageType, len(payload),"RanName", &payload, &xaction)
        notificationRequest := models.NotificationRequest{RanName: mBuf.Meid, Len: mBuf.Len, Payload: *mBuf.Payload,
                StartTime: time.Now(), TransactionId: string(xaction)}
@@ -89,7 +82,7 @@ func TestX2ResetResponseReaderFailure(t *testing.T) {
        rnibErr  := common.NewResourceNotFoundError("nodeb not found")
        readerMock.On("GetNodeb", mBuf.Meid).Return(nb, rnibErr)
 
-       h.Handle(log,e2Sessions, &notificationRequest, messageChannel)
+       h.Handle(log, &notificationRequest, messageChannel)
 
        //TODO:Nothing to verify
 }
@@ -106,10 +99,7 @@ func TestX2ResetResponseUnpackFailure(t *testing.T) {
        }
 
        h := NewX2ResetResponseHandler(rnibReaderProvider)
-       e2Sessions := make(sessions.E2Sessions)
-       //xaction := []byte(fmt.Sprintf("%32s", "1234"))
        xaction := []byte("RanName")
-       e2Sessions[string(xaction)] = sessions.E2SessionDetails{SessionStart: time.Now()}
        mBuf := rmrCgo.NewMBuf(tests.MessageType, len(payload),"RanName", &payload, &xaction)
        notificationRequest := models.NotificationRequest{RanName: mBuf.Meid, Len: mBuf.Len, Payload: *mBuf.Payload,
                StartTime: time.Now(), TransactionId: string(xaction)}
@@ -119,7 +109,7 @@ func TestX2ResetResponseUnpackFailure(t *testing.T) {
        var rnibErr error
        readerMock.On("GetNodeb", mBuf.Meid).Return(nb, rnibErr)
 
-       h.Handle(log,e2Sessions, &notificationRequest, messageChannel)
+       h.Handle(log, &notificationRequest, messageChannel)
 
        //TODO:Nothing to verify
 }