X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=E2Manager%2Fservices%2Frnib_data_service_test.go;h=f6529e38aaf4dd0281ebdce902084283963dff45;hb=5de9b208a878150d4f991816d2283720fea36a1c;hp=1d59846c19efb2ca66de6c28bb48970df0366a82;hpb=a957b2009d4833de7961455104194bb021311c9f;p=ric-plt%2Fe2mgr.git diff --git a/E2Manager/services/rnib_data_service_test.go b/E2Manager/services/rnib_data_service_test.go index 1d59846..f6529e3 100644 --- a/E2Manager/services/rnib_data_service_test.go +++ b/E2Manager/services/rnib_data_service_test.go @@ -259,27 +259,27 @@ func TestPingRnibOkOtherError(t *testing.T) { assert.True(t, res) } -func TestSuccessfulUpdateNodebConnectivityState(t *testing.T) { +func TestSuccessfulUpdateNodebInfoOnConnectionStatusInversion(t *testing.T) { rnibDataService, _, writerMock := setupRnibDataServiceTest(t) event := "event" nodebInfo := &entities.NodebInfo{} - writerMock.On("UpdateNodebConnectivityState", nodebInfo, CHANNEL_NAME, event).Return(nil) + writerMock.On("UpdateNodebInfoOnConnectionStatusInversion", nodebInfo, CHANNEL_NAME, event).Return(nil) - rnibDataService.UpdateNodebConnectivityState(nodebInfo, event) - writerMock.AssertNumberOfCalls(t, "UpdateNodebConnectivityState", 1) + rnibDataService.UpdateNodebInfoOnConnectionStatusInversion(nodebInfo, event) + writerMock.AssertNumberOfCalls(t, "UpdateNodebInfoOnConnectionStatusInversion", 1) } -func TestConnFailureUpdateNodebConnectivityState(t *testing.T) { +func TestConnFailureUpdateNodebInfoOnConnectionStatusInversion(t *testing.T) { rnibDataService, _, writerMock := setupRnibDataServiceTest(t) event := "event" nodebInfo := &entities.NodebInfo{} mockErr := &common.InternalError{Err: &net.OpError{Err: fmt.Errorf("connection error")}} - writerMock.On("UpdateNodebConnectivityState", nodebInfo, CHANNEL_NAME, event).Return(mockErr) + writerMock.On("UpdateNodebInfoOnConnectionStatusInversion", nodebInfo, CHANNEL_NAME, event).Return(mockErr) - rnibDataService.UpdateNodebConnectivityState(nodebInfo, event) - writerMock.AssertNumberOfCalls(t, "UpdateNodebConnectivityState", 3) + rnibDataService.UpdateNodebInfoOnConnectionStatusInversion(nodebInfo, event) + writerMock.AssertNumberOfCalls(t, "UpdateNodebInfoOnConnectionStatusInversion", 3) } //func TestConnFailureThenSuccessGetNodebIdList(t *testing.T) {