X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=E2Manager%2Fmanagers%2Fe2t_shutdown_manager_test.go;h=537d153ffe3da3078cc3d189446c159754cf3469;hb=45758a8e8dbcf279b6ae6731c94d290de580d586;hp=a8c4c3b1156d1653d6a63adfb857eb9989b809ed;hpb=b2f2743968c5cda9a708bf5a6f32678caabd6976;p=ric-plt%2Fe2mgr.git diff --git a/E2Manager/managers/e2t_shutdown_manager_test.go b/E2Manager/managers/e2t_shutdown_manager_test.go index a8c4c3b..537d153 100644 --- a/E2Manager/managers/e2t_shutdown_manager_test.go +++ b/E2Manager/managers/e2t_shutdown_manager_test.go @@ -56,7 +56,7 @@ func initE2TShutdownManagerTest(t *testing.T) (*E2TShutdownManager, *mocks.RnibR httpClientMock := &mocks.HttpClientMock{} rmClient := clients.NewRoutingManagerClient(log, config, httpClientMock) - ranListManager := NewRanListManager(log) + ranListManager := NewRanListManager(log, rnibDataService) ranAlarmService := services.NewRanAlarmService(log, config) ranConnectStatusChangeManager := NewRanConnectStatusChangeManager(log, rnibDataService, ranListManager, ranAlarmService) associationManager := NewE2TAssociationManager(log, rnibDataService, e2tInstancesManager, rmClient, ranConnectStatusChangeManager) @@ -101,7 +101,7 @@ func TestShutdownSuccess1OutOf3Instances(t *testing.T) { /*** nodeb 1 ***/ nodeb1connected := *nodeb1 nodeb1connected.ConnectionStatus = entities.ConnectionStatus_DISCONNECTED - writerMock.On("UpdateNodebInfoOnConnectionStatusInversion", &nodeb1connected, "RAN_CONNECTION_STATUS_CHANGE", "test1_DISCONNECTED").Return(nil) + writerMock.On("UpdateNodebInfoOnConnectionStatusInversion", &nodeb1connected, "test1_DISCONNECTED").Return(nil) nodeb1NotAssociated := *nodeb1 nodeb1NotAssociated.AssociatedE2TInstanceAddress = "" @@ -121,7 +121,7 @@ func TestShutdownSuccess1OutOf3Instances(t *testing.T) { /*** nodeb 5 ***/ nodeb5connected := *nodeb5 nodeb5connected.ConnectionStatus = entities.ConnectionStatus_DISCONNECTED - writerMock.On("UpdateNodebInfoOnConnectionStatusInversion", &nodeb5connected, "RAN_CONNECTION_STATUS_CHANGE", "test5_DISCONNECTED").Return(nil) + writerMock.On("UpdateNodebInfoOnConnectionStatusInversion", &nodeb5connected, "test5_DISCONNECTED").Return(nil) nodeb5NotAssociated := *nodeb5 nodeb5NotAssociated.AssociatedE2TInstanceAddress = "" @@ -188,7 +188,7 @@ func TestShutdownSuccess1Instance2Rans(t *testing.T) { /*** nodeb 1 connected ***/ nodeb1new := *nodeb1 nodeb1new.ConnectionStatus = entities.ConnectionStatus_DISCONNECTED - writerMock.On("UpdateNodebInfoOnConnectionStatusInversion", &nodeb1new, "RAN_CONNECTION_STATUS_CHANGE", "test1_DISCONNECTED").Return(nil) + writerMock.On("UpdateNodebInfoOnConnectionStatusInversion", &nodeb1new, "test1_DISCONNECTED").Return(nil) nodeb1NotAssociated := *nodeb1 nodeb1NotAssociated.AssociatedE2TInstanceAddress = "" @@ -281,7 +281,7 @@ func TestShutdownFailureRoutingManagerError(t *testing.T) { /*** nodeb 1 connected ***/ nodeb1connected := *nodeb1 nodeb1connected.ConnectionStatus = entities.ConnectionStatus_DISCONNECTED - writerMock.On("UpdateNodebInfoOnConnectionStatusInversion", &nodeb1connected, "RAN_CONNECTION_STATUS_CHANGE", "test1_DISCONNECTED").Return(nil) + writerMock.On("UpdateNodebInfoOnConnectionStatusInversion", &nodeb1connected, "test1_DISCONNECTED").Return(nil) nodeb1NotAssociated := *nodeb1 nodeb1NotAssociated.AssociatedE2TInstanceAddress = "" @@ -301,7 +301,7 @@ func TestShutdownFailureRoutingManagerError(t *testing.T) { /*** nodeb 5 connected ***/ nodeb5connected := *nodeb5 nodeb5connected.ConnectionStatus = entities.ConnectionStatus_DISCONNECTED - writerMock.On("UpdateNodebInfoOnConnectionStatusInversion", &nodeb5connected, "RAN_CONNECTION_STATUS_CHANGE", "test5_DISCONNECTED").Return(nil) + writerMock.On("UpdateNodebInfoOnConnectionStatusInversion", &nodeb5connected, "test5_DISCONNECTED").Return(nil) nodeb5NotAssociated := *nodeb5 nodeb5NotAssociated.AssociatedE2TInstanceAddress = "" @@ -329,7 +329,7 @@ func TestShutdownFailureInClearNodebsAssociation(t *testing.T) { nodeb1new := *nodeb1 nodeb1new.ConnectionStatus = entities.ConnectionStatus_DISCONNECTED - writerMock.On("UpdateNodebInfoOnConnectionStatusInversion", &nodeb1new, "RAN_CONNECTION_STATUS_CHANGE", "test1_DISCONNECTED").Return(nil) + writerMock.On("UpdateNodebInfoOnConnectionStatusInversion", &nodeb1new, "test1_DISCONNECTED").Return(nil) nodeb1NotAssociated := *nodeb1 nodeb1NotAssociated.AssociatedE2TInstanceAddress = "" @@ -357,7 +357,7 @@ func TestShutdownFailureInClearNodebsAssociation_UpdateConnectionStatus(t *testi nodeb1new := *nodeb1 nodeb1new.ConnectionStatus = entities.ConnectionStatus_DISCONNECTED - writerMock.On("UpdateNodebInfoOnConnectionStatusInversion", &nodeb1new, "RAN_CONNECTION_STATUS_CHANGE", "test1_DISCONNECTED").Return(common.NewInternalError(fmt.Errorf("for tests"))) + writerMock.On("UpdateNodebInfoOnConnectionStatusInversion", &nodeb1new, "test1_DISCONNECTED").Return(common.NewInternalError(fmt.Errorf("for tests"))) err := shutdownManager.Shutdown(e2tInstance1) @@ -382,7 +382,7 @@ func TestShutdownResourceNotFoundErrorInGetNodeb(t *testing.T) { nodeb1new := *nodeb1 nodeb1new.ConnectionStatus = entities.ConnectionStatus_DISCONNECTED - writerMock.On("UpdateNodebInfoOnConnectionStatusInversion", &nodeb1new, "RAN_CONNECTION_STATUS_CHANGE", "test1_DISCONNECTED").Return(nil) + writerMock.On("UpdateNodebInfoOnConnectionStatusInversion", &nodeb1new, "test1_DISCONNECTED").Return(nil) nodeb1NotAssociated := *nodeb1 nodeb1NotAssociated.AssociatedE2TInstanceAddress = "" @@ -470,7 +470,7 @@ func TestShutdownFailureInRemoveE2TInstance(t *testing.T) { /*** nodeb 1 connected ***/ nodeb1connected := *nodeb1 nodeb1connected.ConnectionStatus = entities.ConnectionStatus_DISCONNECTED - writerMock.On("UpdateNodebInfoOnConnectionStatusInversion", &nodeb1connected, "RAN_CONNECTION_STATUS_CHANGE", "test1_DISCONNECTED").Return(nil) + writerMock.On("UpdateNodebInfoOnConnectionStatusInversion", &nodeb1connected, "test1_DISCONNECTED").Return(nil) nodeb1NotAssociated := *nodeb1 nodeb1NotAssociated.AssociatedE2TInstanceAddress = "" @@ -490,7 +490,7 @@ func TestShutdownFailureInRemoveE2TInstance(t *testing.T) { /*** nodeb 5 connected ***/ nodeb5connected := *nodeb5 nodeb5connected.ConnectionStatus = entities.ConnectionStatus_DISCONNECTED - writerMock.On("UpdateNodebInfoOnConnectionStatusInversion", &nodeb5connected, "RAN_CONNECTION_STATUS_CHANGE", "test5_DISCONNECTED").Return(nil) + writerMock.On("UpdateNodebInfoOnConnectionStatusInversion", &nodeb5connected, "test5_DISCONNECTED").Return(nil) nodeb5NotAssociated := *nodeb5 nodeb5NotAssociated.AssociatedE2TInstanceAddress = ""