X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=E2Manager%2Fcontrollers%2Fnodeb_controller_test.go;h=f57522c7841924a480c538a8c5aaf0402709c10c;hb=b1b65ff8cbf6dd3ee8d6dec19908ed1b1db07de0;hp=e62e7c0633cbd7cb8b412b874c00dffc9a76c05d;hpb=885ce20e6a593863923b249bf74ffc09ad610176;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,