+func TestControllerUpdateGnbGetNodebSuccessRemoveServedNrCellsFailure(t *testing.T) {
+ oldServedNrCells := generateServedNrCells("whatever1","whatever2")
+ context := controllerUpdateGnbTestContext{
+ removeServedNrCellsParams: &removeServedNrCellsParams{
+ err: common.NewInternalError(errors.New("#writer.UpdateGnbCells - Internal Error")),
+ servedNrCells: oldServedNrCells,
+ },
+ getNodebInfoResult: &getNodebInfoResult{
+ nodebInfo: &entities.NodebInfo{
+ RanName: RanName,
+ ConnectionStatus: entities.ConnectionStatus_CONNECTED,
+ AssociatedE2TInstanceAddress: AssociatedE2TInstanceAddress,
+ Configuration: &entities.NodebInfo_Gnb{Gnb: &entities.Gnb{ServedNrCells: oldServedNrCells}},
+ },
+ rnibError: nil,
+ },
+ requestBody: map[string]interface{}{
+ "servedNrCells": []interface{}{
+ map[string]interface{}{
+ "servedNrCellInformation": buildServedNrCellInformation(""),
+ "nrNeighbourInfos": []interface{}{
+ buildNrNeighbourInformation(""),
+ },
+ },
+ },
+ },
+ expectedStatusCode: http.StatusInternalServerError,
+ expectedJsonResponse: RnibErrorJson,
+ }
+
+ controllerUpdateGnbTestExecuter(t, &context)
+}
+