X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=E2Manager%2Fcontrollers%2Fnodeb_controller_test.go;h=f57522c7841924a480c538a8c5aaf0402709c10c;hb=7bd44bd2bab64defc41bdc5da6571f6bfe913da6;hp=e62e7c0633cbd7cb8b412b874c00dffc9a76c05d;hpb=c3dbacd8ab5418eedbdf76dac2031dd3b81d88b0;p=ric-plt%2Fe2mgr.git diff --git a/E2Manager/controllers/nodeb_controller_test.go b/E2Manager/controllers/nodeb_controller_test.go index e62e7c0..f57522c 100644 --- a/E2Manager/controllers/nodeb_controller_test.go +++ b/E2Manager/controllers/nodeb_controller_test.go @@ -1167,14 +1167,25 @@ func TestControllerUpdateEnbNgEnbFailure(t *testing.T) { requestBody := map[string]interface{}{ "enb": map[string]interface{}{ - "enbType": 5, + "enbType": 3, "servedCells": []interface{}{ buildServedCell(""), }}, } + oldServedCells := generateServedCells("whatever1", "whatever2") + context := controllerUpdateEnbTestContext{ - getNodebInfoResult: nil, + getNodebInfoResult: &getNodebInfoResult{ + nodebInfo: &entities.NodebInfo{ + RanName: RanName, + ConnectionStatus: entities.ConnectionStatus_CONNECTED, + AssociatedE2TInstanceAddress: AssociatedE2TInstanceAddress, + NodeType: entities.Node_ENB, + Configuration: &entities.NodebInfo_Enb{Enb: &entities.Enb{ServedCells: oldServedCells, EnbType: entities.EnbType_MACRO_NG_ENB}}, + }, + rnibError: nil, + }, requestBody: requestBody, expectedStatusCode: http.StatusBadRequest, expectedJsonResponse: ValidationFailureJson,