From e4f4427a1dfde7ac6fa5656496627ad88f82a1a6 Mon Sep 17 00:00:00 2001 From: Amichai Date: Sun, 22 Dec 2019 11:18:10 +0200 Subject: [PATCH 1/1] [RICPLT-2837] Fix UT to use real E2tInstanceManager instead of mock Change-Id: Ieea908ce3ecbef284732d846eb53ee0c6430d57f Signed-off-by: Amichai --- E2Manager/go.sum | 2 ++ .../handlers/rmrmsghandlers/e2_term_init_notification_handler_test.go | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/E2Manager/go.sum b/E2Manager/go.sum index a15cf88..9c518c1 100644 --- a/E2Manager/go.sum +++ b/E2Manager/go.sum @@ -7,6 +7,8 @@ gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/entities v1.0.27 h1:nvZDzuB/SYKDuF1 gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/entities v1.0.27/go.mod h1:Fh23KkroYw5CRBh39WzZzxpKSkpQWL3scdzGnMngLo8= gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/entities v1.0.28 h1:+8Nn+Jn/AvhwBI1LtLsNS1PtOGAOYUHdicOrMn/8mmU= gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/entities v1.0.28/go.mod h1:Fh23KkroYw5CRBh39WzZzxpKSkpQWL3scdzGnMngLo8= +gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/reader v1.0.27 h1:sWjlU/wBiWIBeSixnr9etCqtNmS2LW8jv+x2JGpf2eI= +gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/reader v1.0.27/go.mod h1:vZ/335+rRSQW82wcbc80fNNICSK3TiCqIxmkqeC2Pfo= gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/reader v1.0.28 h1:AaYvK59fxDXQUV9NCo6WuxDOvBQbnRU3WTPyJaYhkkg= gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/reader v1.0.28/go.mod h1:vZ/335+rRSQW82wcbc80fNNICSK3TiCqIxmkqeC2Pfo= gerrit.o-ran-sc.org/r/ric-plt/sdlgo.git v0.5.0 h1:+P3XuWKSaMbzh5PNtrW9gkZlCN0hKrZq+Cn8JetwBys= diff --git a/E2Manager/handlers/rmrmsghandlers/e2_term_init_notification_handler_test.go b/E2Manager/handlers/rmrmsghandlers/e2_term_init_notification_handler_test.go index 84ab950..f6779df 100644 --- a/E2Manager/handlers/rmrmsghandlers/e2_term_init_notification_handler_test.go +++ b/E2Manager/handlers/rmrmsghandlers/e2_term_init_notification_handler_test.go @@ -184,7 +184,7 @@ func TestE2TermInitHandlerSuccessOneRan(t *testing.T) { } func TestE2TermInitHandlerSuccessOneRanShuttingdown(t *testing.T) { - _, handler, readerMock, writerMock, rmrMessengerMock, e2tInstancesManagerMock, _ := initRanLostConnectionTest(t) + _, handler, readerMock, writerMock, rmrMessengerMock := initRanLostConnectionTestWithRealE2tInstanceManager(t) var rnibErr error var initialNodeb = &entities.NodebInfo{RanName: RanName, ConnectionStatus: entities.ConnectionStatus_SHUTTING_DOWN, E2ApplicationProtocol: entities.E2ApplicationProtocol_X2_SETUP_REQUEST} @@ -201,7 +201,7 @@ func TestE2TermInitHandlerSuccessOneRanShuttingdown(t *testing.T) { e2tInstance := entities.NewE2TInstance(e2tInstanceAddress) e2tInstance.AssociatedRanList = append(e2tInstance.AssociatedRanList, RanName) - e2tInstancesManagerMock.On("GetE2TInstance", e2tInstanceAddress).Return(e2tInstance, nil) + readerMock.On("GetE2TInstance", e2tInstanceAddress).Return(e2tInstance, nil) notificationRequest := &models.NotificationRequest{RanName: RanName, Payload: []byte(e2tInitPayload)} handler.Handle(notificationRequest) -- 2.16.6