X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=E2Manager%2Fhandlers%2Frmrmsghandlers%2Fsetup_response_notification_handler_test.go;h=b401cbb55a3cbe05d8f4fb8f576fb4184818edb0;hb=a269db89a144d3f041eb265c9aa2e7633142429f;hp=4d3a0ee98284cb1007cb353d0e7279592dfa080a;hpb=3ae760f4378ea43575eca6e83ccc01084566e7cf;p=ric-plt%2Fe2mgr.git diff --git a/E2Manager/handlers/rmrmsghandlers/setup_response_notification_handler_test.go b/E2Manager/handlers/rmrmsghandlers/setup_response_notification_handler_test.go index 4d3a0ee..b401cbb 100644 --- a/E2Manager/handlers/rmrmsghandlers/setup_response_notification_handler_test.go +++ b/E2Manager/handlers/rmrmsghandlers/setup_response_notification_handler_test.go @@ -149,7 +149,7 @@ func executeHandleSetupSuccessResponse(t *testing.T, tc setupSuccessResponseTest } testContext.readerMock.On("GetNodeb", RanName).Return(nodebInfo, rnibErr) - testContext.writerMock.On("SaveNodeb", mock.Anything, mock.Anything).Return(tc.saveNodebMockError) + testContext.writerMock.On("SaveNodeb", mock.Anything).Return(tc.saveNodebMockError) testContext.rmrMessengerMock.On("SendMsg", tc.statusChangeMbuf, true).Return(&rmrCgo.MBuf{}, tc.sendMsgError) handler.Handle(¬ificationRequest) @@ -186,7 +186,7 @@ func executeHandleSetupFailureResponse(t *testing.T, tc setupFailureResponseTest } testContext.readerMock.On("GetNodeb", RanName).Return(nodebInfo, rnibErr) - testContext.writerMock.On("SaveNodeb", mock.Anything, mock.Anything).Return(tc.saveNodebMockError) + testContext.writerMock.On("SaveNodeb", mock.Anything).Return(tc.saveNodebMockError) handler.Handle(¬ificationRequest) return testContext, nodebInfo @@ -207,7 +207,7 @@ func TestX2SetupResponse(t *testing.T) { testContext, nodebInfo := executeHandleSetupSuccessResponse(t, tc) testContext.readerMock.AssertCalled(t, "GetNodeb", RanName) - testContext.writerMock.AssertCalled(t, "SaveNodeb", mock.Anything, nodebInfo) + testContext.writerMock.AssertCalled(t, "SaveNodeb", nodebInfo) assert.EqualValues(t, entities.ConnectionStatus_CONNECTED, nodebInfo.ConnectionStatus) assert.EqualValues(t, entities.Node_ENB, nodebInfo.NodeType) @@ -229,7 +229,7 @@ func TestX2SetupFailureResponse(t *testing.T) { testContext, nodebInfo := executeHandleSetupFailureResponse(t, tc) testContext.readerMock.AssertCalled(t, "GetNodeb", RanName) - testContext.writerMock.AssertCalled(t, "SaveNodeb", mock.Anything, nodebInfo) + testContext.writerMock.AssertCalled(t, "SaveNodeb", nodebInfo) assert.EqualValues(t, entities.ConnectionStatus_CONNECTED_SETUP_FAILED, nodebInfo.ConnectionStatus) assert.EqualValues(t, entities.Failure_X2_SETUP_FAILURE, nodebInfo.FailureType) assert.NotNil(t, nodebInfo.SetupFailure) @@ -251,7 +251,7 @@ func TestEndcSetupResponse(t *testing.T) { testContext, nodebInfo := executeHandleSetupSuccessResponse(t, tc) testContext.readerMock.AssertCalled(t, "GetNodeb", RanName) - testContext.writerMock.AssertCalled(t, "SaveNodeb", mock.Anything, nodebInfo) + testContext.writerMock.AssertCalled(t, "SaveNodeb", nodebInfo) assert.EqualValues(t, entities.ConnectionStatus_CONNECTED, nodebInfo.ConnectionStatus) assert.EqualValues(t, entities.Node_GNB, nodebInfo.NodeType) assert.IsType(t, &entities.NodebInfo_Gnb{}, nodebInfo.Configuration) @@ -273,7 +273,7 @@ func TestEndcSetupFailureResponse(t *testing.T) { testContext, nodebInfo := executeHandleSetupFailureResponse(t, tc) testContext.readerMock.AssertCalled(t, "GetNodeb", RanName) - testContext.writerMock.AssertCalled(t, "SaveNodeb", mock.Anything, nodebInfo) + testContext.writerMock.AssertCalled(t, "SaveNodeb", nodebInfo) assert.EqualValues(t, entities.ConnectionStatus_CONNECTED_SETUP_FAILED, nodebInfo.ConnectionStatus) assert.EqualValues(t, entities.Failure_ENDC_X2_SETUP_FAILURE, nodebInfo.FailureType) assert.NotNil(t, nodebInfo.SetupFailure) @@ -309,7 +309,7 @@ func TestSetupResponseSaveNodebFailure(t *testing.T) { testContext, nodebInfo := executeHandleSetupSuccessResponse(t, tc) testContext.readerMock.AssertCalled(t, "GetNodeb", RanName) - testContext.writerMock.AssertCalled(t, "SaveNodeb", mock.Anything, nodebInfo) + testContext.writerMock.AssertCalled(t, "SaveNodeb", nodebInfo) testContext.rmrMessengerMock.AssertNotCalled(t, "SendMsg") } @@ -328,7 +328,7 @@ func TestSetupResponseStatusChangeSendFailure(t *testing.T) { testContext, nodebInfo := executeHandleSetupSuccessResponse(t, tc) testContext.readerMock.AssertCalled(t, "GetNodeb", RanName) - testContext.writerMock.AssertCalled(t, "SaveNodeb", mock.Anything, nodebInfo) + testContext.writerMock.AssertCalled(t, "SaveNodeb", nodebInfo) assert.EqualValues(t, entities.ConnectionStatus_CONNECTED, nodebInfo.ConnectionStatus) assert.EqualValues(t, entities.Node_ENB, nodebInfo.NodeType)