X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=E2Manager%2Fhandlers%2Frmrmsghandlers%2Fran_lost_connection_handler_test.go;h=babe4abe9ceba93e96ed6652ac8313247042f018;hb=6df73c6bad82b1cbc3fe487bbe746b0c3b141b80;hp=8e1464fafb91d798743b8ea597c0d45b7b63fb75;hpb=1ec13d4076e7c7abefac6176462c1fee31229213;p=ric-plt%2Fe2mgr.git diff --git a/E2Manager/handlers/rmrmsghandlers/ran_lost_connection_handler_test.go b/E2Manager/handlers/rmrmsghandlers/ran_lost_connection_handler_test.go index 8e1464f..babe4ab 100644 --- a/E2Manager/handlers/rmrmsghandlers/ran_lost_connection_handler_test.go +++ b/E2Manager/handlers/rmrmsghandlers/ran_lost_connection_handler_test.go @@ -20,7 +20,6 @@ import ( "e2mgr/logger" "e2mgr/mocks" "e2mgr/models" - "e2mgr/sessions" "github.com/pkg/errors" "testing" ) @@ -31,8 +30,8 @@ func TestLostConnectionHandlerSuccess(t *testing.T) { notificationRequest := models.NotificationRequest{RanName: ranName} ranReconnectionManagerMock := &mocks.RanReconnectionManagerMock{} ranReconnectionManagerMock.On("ReconnectRan", ranName).Return(nil) - handler := NewRanLostConnectionHandler(ranReconnectionManagerMock) - handler.Handle(logger, make(sessions.E2Sessions), ¬ificationRequest, nil) + handler := NewRanLostConnectionHandler(logger, ranReconnectionManagerMock) + handler.Handle(¬ificationRequest) ranReconnectionManagerMock.AssertCalled(t, "ReconnectRan", ranName) } @@ -42,7 +41,7 @@ func TestLostConnectionHandlerFailure(t *testing.T) { notificationRequest := models.NotificationRequest{RanName: ranName} ranReconnectionManagerMock := &mocks.RanReconnectionManagerMock{} ranReconnectionManagerMock.On("ReconnectRan", ranName).Return(errors.New("error")) - handler := NewRanLostConnectionHandler(ranReconnectionManagerMock) - handler.Handle(logger, make(sessions.E2Sessions), ¬ificationRequest, nil) + handler := NewRanLostConnectionHandler(logger, ranReconnectionManagerMock) + handler.Handle(¬ificationRequest) ranReconnectionManagerMock.AssertCalled(t, "ReconnectRan", ranName) -} \ No newline at end of file +}