[RICPLT-2146] Remove E2Sessions......
[ric-plt/e2mgr.git] / E2Manager / handlers / rmrmsghandlers / endc_configuration_update_handler_test.go
index 450ac8d..9005924 100644 (file)
@@ -20,48 +20,45 @@ import (
        "e2mgr/logger"
        "e2mgr/models"
        "e2mgr/rmrCgo"
-       "e2mgr/sessions"
        "e2mgr/tests"
        "github.com/stretchr/testify/assert"
        "testing"
        "time"
 )
 
-func TestHandleSuccessEndcConfigUpdate(t *testing.T){
-/*     log, err := logger.InitLogger(logger.InfoLevel)
-       if err!=nil{
-               t.Errorf("#endc_configuration_update_handler_test.TestHandleSuccessEndcConfigUpdate - failed to initialize logger, error: %s", err)
-       }
-       h := EndcConfigurationUpdateHandler{}
-       E2Sessions := make(sessions.E2Sessions)
+func TestHandleSuccessEndcConfigUpdate(t *testing.T) {
+       /*      log, err := logger.InitLogger(logger.InfoLevel)
+               if err!=nil{
+                       t.Errorf("#endc_configuration_update_handler_test.TestHandleSuccessEndcConfigUpdate - failed to initialize logger, error: %s", err)
+               }
+               h := EndcConfigurationUpdateHandler{}
 
-       payload := tests.GetPackedPayload(t)
-       mBuf := rmrCgo.NewMBuf(10370, len(payload),"RanName", &payload, &tests.DummyXAction)
-       notificationRequest := models.NotificationRequest{RanName: mBuf.Meid, Len: mBuf.Len, Payload: *mBuf.Payload, StartTime: time.Now()}
-       messageChannel := make(chan *models.NotificationResponse)
+               payload := tests.GetPackedPayload(t)
+               mBuf := rmrCgo.NewMBuf(10370, len(payload),"RanName", &payload, &tests.DummyXAction)
+               notificationRequest := models.NotificationRequest{RanName: mBuf.Meid, Len: mBuf.Len, Payload: *mBuf.Payload, StartTime: time.Now()}
+               messageChannel := make(chan *models.NotificationResponse)
 
-       go h.Handle(log, E2Sessions, &notificationRequest, messageChannel)
+               go h.Handle(log, &notificationRequest, messageChannel)
 
-       response := <-messageChannel
+               response := <-messageChannel
 
-       assert.NotEmpty(t, response)
-       assert.EqualValues(t, 10371, response.MgsType)
-       assert.True(t, len(response.Payload) > 0)*/
+               assert.NotEmpty(t, response)
+               assert.EqualValues(t, 10371, response.MgsType)
+               assert.True(t, len(response.Payload) > 0)*/
 }
 
-func TestHandleFailureEndcConfigUpdate(t *testing.T){
+func TestHandleFailureEndcConfigUpdate(t *testing.T) {
        log, err := logger.InitLogger(logger.InfoLevel)
-       if err!=nil{
+       if err != nil {
                t.Errorf("#endc_configuration_update_handler_test.TestHandleFailureEndcConfigUpdate - failed to initialize logger, error: %s", err)
        }
        h := EndcConfigurationUpdateHandler{}
-       E2Sessions := make(sessions.E2Sessions)
 
-       mBuf := rmrCgo.NewMBuf(tests.MessageType, 4,"RanName", &tests.DummyPayload, &tests.DummyXAction)
+       mBuf := rmrCgo.NewMBuf(tests.MessageType, 4, "RanName", &tests.DummyPayload, &tests.DummyXAction)
        notificationRequest := models.NotificationRequest{RanName: mBuf.Meid, Len: mBuf.Len, Payload: *mBuf.Payload, StartTime: time.Now()}
        messageChannel := make(chan *models.NotificationResponse)
 
-       go h.Handle(log, E2Sessions, &notificationRequest, messageChannel)
+       go h.Handle(log, &notificationRequest, messageChannel)
 
        response := <-messageChannel