From: Amichai Date: Sun, 22 Dec 2019 09:18:10 +0000 (+0200) Subject: [RICPLT-2837] Fix UT to use real E2tInstanceManager instead of mock X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F93%2F2093%2F2;hp=3815ac0efa8b297be3e163f72279e18cc09a3514;p=ric-plt%2Fe2mgr.git [RICPLT-2837] Fix UT to use real E2tInstanceManager instead of mock Change-Id: Ieea908ce3ecbef284732d846eb53ee0c6430d57f Signed-off-by: Amichai --- 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)