2 // Copyright 2019 AT&T Intellectual Property
3 // Copyright 2019 Nokia
5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
21 "gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/entities"
23 "gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/common"
26 "github.com/golang/protobuf/proto"
27 "github.com/golang/protobuf/ptypes/timestamp"
28 "github.com/stretchr/testify/assert"
33 func TestInitRNibWriter(t *testing.T) {
35 initSdlInstanceMock(namespace, 1)
36 available, created := writerPool.Stats()
37 assert.Equal(t, available, 0, "number of available objects in the writerPool should be 0")
38 assert.Equal(t, created, 0, "number of created objects in the writerPool should be 0")
43 func TestInitPool(t *testing.T) {
45 sdlInstanceMock := new(mocks.MockSdlInstance)
46 initPool(1, func() interface{} {
47 sdlI := common.ISdlInstance(sdlInstanceMock)
48 return &rNibWriterInstance{sdl: &sdlI, namespace: namespace}
50 func(obj interface{}) {
53 assert.NotNil(t, writerPool)
54 assert.NotNil(t, writerPool.New)
55 assert.NotNil(t, writerPool.Destroy)
56 available, created := writerPool.Stats()
57 assert.Equal(t, 0, available, "number of available objects in the writerPool should be 0")
58 assert.Equal(t, 0, created, "number of created objects in the writerPool should be 0")
61 var namespace = "namespace"
63 func initSdlInstanceMock(namespace string, poolSize int) *mocks.MockSdlInstance {
64 sdlInstanceMock := new(mocks.MockSdlInstance)
65 initPool(poolSize, func() interface{} {
66 sdlI := common.ISdlInstance(sdlInstanceMock)
67 return &rNibWriterInstance{sdl: &sdlI, namespace: namespace}
69 func(obj interface{}) {
72 return sdlInstanceMock
75 func TestSaveEnb(t *testing.T) {
77 ranName := "RAN:" + name
79 sdlInstanceMock := initSdlInstanceMock(namespace, 1)
81 nb := entities.NodebInfo{}
82 nb.NodeType = entities.Node_ENB
83 nb.ConnectionStatus = 1
87 cell := &entities.ServedCellInfo{CellId:"aaff", Pci:3}
88 cellEntity := entities.Cell{Type:entities.Cell_LTE_CELL, Cell:&entities.Cell_ServedCellInfo{ServedCellInfo:cell}}
89 enb.ServedCells = []*entities.ServedCellInfo{cell}
90 nb.Configuration = &entities.NodebInfo_Enb{Enb:&enb}
91 data, err := proto.Marshal(&nb)
93 t.Errorf("#rNibWriter_test.TestSaveEnb - Failed to marshal NodeB entity. Error: %v", err)
97 cellData, err := proto.Marshal(&cellEntity)
99 t.Errorf("#rNibWriter_test.TestSaveEnb - Failed to marshal Cell entity. Error: %v", err)
101 var setExpected []interface{}
102 setExpected = append(setExpected, ranName, data)
103 setExpected = append(setExpected, "ENB:02f829:4a952a0a", data)
104 setExpected = append(setExpected, fmt.Sprintf("CELL:%s", cell.GetCellId()), cellData)
105 setExpected = append(setExpected, fmt.Sprintf("PCI:%s:%02x", name, cell.GetPci()), cellData)
107 sdlInstanceMock.On("Set", []interface{}{setExpected}).Return(e)
108 nbIdentity := &entities.NbIdentity{InventoryName:name, GlobalNbId:&entities.GlobalNbId{PlmnId:"02f829", NbId:"4a952a0a"}}
109 nbIdData, err := proto.Marshal(nbIdentity)
111 t.Errorf("#rNibWriter_test.TestSaveEnb - Failed to marshal NodeB Identity entity. Error: %v", err)
113 sdlInstanceMock.On("AddMember", "ENB", []interface{}{nbIdData}).Return(e)
114 rNibErr := w.SaveNodeb(nbIdentity, &nb)
115 assert.Nil(t, rNibErr)
118 func TestSaveEnbCellIdValidationFailure(t *testing.T) {
121 initSdlInstanceMock(namespace, 1)
123 nb := entities.NodebInfo{}
124 nb.NodeType = entities.Node_ENB
125 nb.ConnectionStatus = 1
128 enb := entities.Enb{}
129 cell := &entities.ServedCellInfo{Pci:3}
130 enb.ServedCells = []*entities.ServedCellInfo{cell}
131 nb.Configuration = &entities.NodebInfo_Enb{Enb:&enb}
133 nbIdentity := &entities.NbIdentity{InventoryName:name, GlobalNbId:&entities.GlobalNbId{PlmnId:"02f829", NbId:"4a952a0a"}}
134 rNibErr := w.SaveNodeb(nbIdentity, &nb)
135 assert.NotNil(t, rNibErr)
136 assert.Equal(t, common.VALIDATION_ERROR, rNibErr.GetCode())
137 assert.Equal(t, "3 VALIDATION_ERROR - #utils.ValidateAndBuildCellIdKey - an empty cell id received", rNibErr.Error())
140 func TestSaveEnbInventoryNameValidationFailure(t *testing.T) {
142 initSdlInstanceMock(namespace, 1)
144 nb := entities.NodebInfo{}
145 nb.NodeType = entities.Node_ENB
146 nb.ConnectionStatus = 1
149 enb := entities.Enb{}
150 cell := &entities.ServedCellInfo{CellId:"aaa",Pci:3}
151 enb.ServedCells = []*entities.ServedCellInfo{cell}
152 nb.Configuration = &entities.NodebInfo_Enb{Enb:&enb}
154 nbIdentity := &entities.NbIdentity{InventoryName:"", GlobalNbId:&entities.GlobalNbId{PlmnId:"02f829", NbId:"4a952a0a"}}
155 rNibErr := w.SaveNodeb(nbIdentity, &nb)
156 assert.NotNil(t, rNibErr)
157 assert.Equal(t, common.VALIDATION_ERROR, rNibErr.GetCode())
158 assert.Equal(t, "3 VALIDATION_ERROR - #utils.ValidateAndBuildNodeBNameKey - an empty inventory name received", rNibErr.Error())
161 func TestSaveEnbOnClosedPool(t *testing.T) {
164 sdlInstanceMock := initSdlInstanceMock(namespace, 1)
166 nb := entities.NodebInfo{}
167 nb.NodeType = entities.Node_ENB
168 nb.ConnectionStatus = 1
171 enb := entities.Enb{}
172 nb.Configuration = &entities.NodebInfo_Enb{Enb:&enb}
173 data, err := proto.Marshal(&nb)
175 t.Errorf("#rNibWriter_test.TestSaveEnbOnClosedPool - Failed to marshal NodeB entity. Error: %v", err)
177 setExpected := []interface{}{name, data}
179 sdlInstanceMock.On("Set", setExpected).Return(e)
181 nbIdentity := &entities.NbIdentity{}
182 assert.Panics(t, func(){w.SaveNodeb(nbIdentity, &nb)})
185 func TestSaveGnbCellIdValidationFailure(t *testing.T) {
188 initSdlInstanceMock(namespace, 1)
190 nb := entities.NodebInfo{}
191 nb.NodeType = entities.Node_GNB
192 nb.ConnectionStatus = 1
195 gnb := entities.Gnb{}
196 cellInfo:= &entities.ServedNRCellInformation{NrPci:2}
197 cell := &entities.ServedNRCell{ServedNrCellInformation:cellInfo}
198 gnb.ServedNrCells = []*entities.ServedNRCell{cell}
199 nb.Configuration = &entities.NodebInfo_Gnb{Gnb:&gnb}
201 nbIdentity := &entities.NbIdentity{InventoryName:name, GlobalNbId:&entities.GlobalNbId{PlmnId:"02f829", NbId:"4a952a0a"}}
202 rNibErr := w.SaveNodeb(nbIdentity, &nb)
203 assert.NotNil(t, rNibErr)
204 assert.Equal(t, common.VALIDATION_ERROR, rNibErr.GetCode())
205 assert.Equal(t, "3 VALIDATION_ERROR - #utils.ValidateAndBuildNrCellIdKey - an empty cell id received", rNibErr.Error())
208 func TestSaveGnb(t *testing.T) {
210 ranName := "RAN:" + name
212 sdlInstanceMock := initSdlInstanceMock(namespace, 1)
214 nb := entities.NodebInfo{}
215 nb.NodeType = entities.Node_GNB
216 nb.ConnectionStatus = 1
219 gnb := entities.Gnb{}
220 cellInfo:= &entities.ServedNRCellInformation{NrPci:2,CellId:"ccdd"}
221 cell := &entities.ServedNRCell{ServedNrCellInformation:cellInfo}
222 cellEntity := entities.Cell{Type:entities.Cell_NR_CELL, Cell:&entities.Cell_ServedNrCell{ServedNrCell:cell}}
223 gnb.ServedNrCells = []*entities.ServedNRCell{cell}
224 nb.Configuration = &entities.NodebInfo_Gnb{Gnb:&gnb}
225 data, err := proto.Marshal(&nb)
227 t.Errorf("#rNibWriter_test.TestSaveGnb - Failed to marshal NodeB entity. Error: %v", err)
232 cellData, err := proto.Marshal(&cellEntity)
234 t.Errorf("#rNibWriter_test.TestSaveGnb - Failed to marshal Cell entity. Error: %v", err)
236 var setExpected []interface{}
237 setExpected = append(setExpected, ranName, data)
238 setExpected = append(setExpected, "GNB:02f829:4a952a0a", data)
239 setExpected = append(setExpected, fmt.Sprintf("NRCELL:%s", cell.GetServedNrCellInformation().GetCellId()), cellData)
240 setExpected = append(setExpected, fmt.Sprintf("PCI:%s:%02x", name, cell.GetServedNrCellInformation().GetNrPci()), cellData)
242 sdlInstanceMock.On("Set", []interface{}{setExpected}).Return(e)
243 nbIdentity := &entities.NbIdentity{InventoryName:name, GlobalNbId:&entities.GlobalNbId{PlmnId:"02f829", NbId:"4a952a0a"}}
244 nbIdData, err := proto.Marshal(nbIdentity)
246 t.Errorf("#rNibWriter_test.TestSaveGnb - Failed to marshal NodeB Identity entity. Error: %v", err)
248 sdlInstanceMock.On("AddMember", "GNB", []interface{}{nbIdData}).Return(e)
250 rNibErr := w.SaveNodeb(nbIdentity, &nb)
251 assert.Nil(t, rNibErr)
254 func TestSaveRanLoadInformationSuccess(t *testing.T) {
255 inventoryName := "name"
256 loadKey, validationErr := common.ValidateAndBuildRanLoadInformationKey(inventoryName)
258 if validationErr != nil {
259 t.Errorf("#rNibWriter_test.TestSaveRanLoadInformationSuccess - Failed to build ran load infromation key. Error: %v", validationErr)
263 sdlInstanceMock := initSdlInstanceMock(namespace, 1)
267 ranLoadInformation := generateRanLoadInformation()
268 data, err := proto.Marshal(ranLoadInformation)
271 t.Errorf("#rNibWriter_test.TestSaveRanLoadInformation - Failed to marshal RanLoadInformation entity. Error: %v", err)
275 var setExpected []interface{}
276 setExpected = append(setExpected, loadKey, data)
277 sdlInstanceMock.On("Set", []interface{}{setExpected}).Return(e)
280 rNibErr := w.SaveRanLoadInformation(inventoryName, ranLoadInformation)
281 assert.Nil(t, rNibErr)
284 func TestSaveRanLoadInformationMarshalNilFailure(t *testing.T) {
285 inventoryName := "name2"
287 initSdlInstanceMock(namespace, 1)
290 expectedErr := common.NewInternalError(errors.New("proto: Marshal called with nil"))
291 err:= w.SaveRanLoadInformation(inventoryName, nil)
292 assert.Equal(t, expectedErr, err)
295 func TestSaveRanLoadInformationEmptyInventoryNameFailure(t *testing.T) {
298 initSdlInstanceMock(namespace, 1)
301 err:= w.SaveRanLoadInformation(inventoryName, nil)
302 assert.NotNil(t, err)
303 assert.Equal(t, common.VALIDATION_ERROR, err.GetCode())
306 func TestSaveRanLoadInformationSdlFailure(t *testing.T) {
307 inventoryName := "name2"
309 loadKey, validationErr := common.ValidateAndBuildRanLoadInformationKey(inventoryName)
311 if validationErr != nil {
312 t.Errorf("#rNibWriter_test.TestSaveRanLoadInformationSuccess - Failed to build ran load infromation key. Error: %v", validationErr)
317 sdlInstanceMock := initSdlInstanceMock(namespace, 1)
320 ranLoadInformation := generateRanLoadInformation()
321 data, err := proto.Marshal(ranLoadInformation)
324 t.Errorf("#rNibWriter_test.TestSaveRanLoadInformation - Failed to marshal RanLoadInformation entity. Error: %v", err)
328 expectedErr := errors.New("expected error")
329 var setExpected []interface{}
330 setExpected = append(setExpected, loadKey, data)
331 sdlInstanceMock.On("Set", []interface{}{setExpected}).Return(expectedErr)
334 rNibErr := w.SaveRanLoadInformation(inventoryName, ranLoadInformation)
335 assert.NotNil(t, rNibErr)
336 assert.Equal(t, common.INTERNAL_ERROR, rNibErr.GetCode())
337 assert.Equal(t, expectedErr, rNibErr.GetError())
340 func generateCellLoadInformation() *entities.CellLoadInformation {
341 cellLoadInformation := entities.CellLoadInformation{}
343 cellLoadInformation.CellId = "123"
345 ulInterferenceOverloadIndication := entities.UlInterferenceOverloadIndication_HIGH_INTERFERENCE
346 cellLoadInformation.UlInterferenceOverloadIndications = []entities.UlInterferenceOverloadIndication{ulInterferenceOverloadIndication}
348 ulHighInterferenceInformation := entities.UlHighInterferenceInformation{
350 UlHighInterferenceIndication:"xxx",
353 cellLoadInformation.UlHighInterferenceInfos = []*entities.UlHighInterferenceInformation{&ulHighInterferenceInformation }
355 cellLoadInformation.RelativeNarrowbandTxPower = &entities.RelativeNarrowbandTxPower{
357 RntpThreshold:entities.RntpThreshold_NEG_4,
358 NumberOfCellSpecificAntennaPorts: entities.NumberOfCellSpecificAntennaPorts_V1_ANT_PRT,
360 PdcchInterferenceImpact:2,
361 EnhancedRntp: &entities.EnhancedRntp{
362 EnhancedRntpBitmap:"xxx",
363 RntpHighPowerThreshold:entities.RntpThreshold_NEG_2,
364 EnhancedRntpStartTimes: []*entities.StartTime{&entities.StartTime{StartSfn:500,StartSubframeNumber:5}},
368 cellLoadInformation.AbsInformation = &entities.AbsInformation{
369 Mode: entities.AbsInformationMode_ABS_INFO_FDD,
370 AbsPatternInfo:"xxx",
371 NumberOfCellSpecificAntennaPorts:entities.NumberOfCellSpecificAntennaPorts_V2_ANT_PRT,
372 MeasurementSubset:"xxx",
375 cellLoadInformation.InvokeIndication = entities.InvokeIndication_ABS_INFORMATION
377 cellLoadInformation.ExtendedUlInterferenceOverloadInfo = &entities.ExtendedUlInterferenceOverloadInfo{
378 AssociatedSubframes:"xxx",
379 ExtendedUlInterferenceOverloadIndications:cellLoadInformation.UlInterferenceOverloadIndications,
382 compInformationItem := &entities.CompInformationItem{
383 CompHypothesisSets: []*entities.CompHypothesisSet{&entities.CompHypothesisSet{CellId: "789", CompHypothesis:"xxx"}},
387 cellLoadInformation.CompInformation = &entities.CompInformation{
388 CompInformationItems:[]*entities.CompInformationItem{compInformationItem},
389 CompInformationStartTime:[]*entities.StartTime{&entities.StartTime{StartSfn:123,StartSubframeNumber:456}},
392 cellLoadInformation.DynamicDlTransmissionInformation = &entities.DynamicDlTransmissionInformation{
393 State: entities.NaicsState_NAICS_ACTIVE,
394 TransmissionModes:"xxx",
396 PAList:[]entities.PA{entities.PA_DB_NEG_3},
399 return &cellLoadInformation
402 func generateRanLoadInformation() *entities.RanLoadInformation {
403 ranLoadInformation := entities.RanLoadInformation{}
405 ranLoadInformation.LoadTimestamp = ×tamp.Timestamp{Seconds:time.Now().Unix(),Nanos: int32(time.Now().UnixNano())}
408 cellLoadInformation := generateCellLoadInformation()
409 ranLoadInformation.CellLoadInfos = []*entities.CellLoadInformation{cellLoadInformation}
411 return &ranLoadInformation
414 func TestSaveNilEntityFailure(t *testing.T) {
416 initSdlInstanceMock(namespace, 1)
418 expectedErr := common.NewInternalError(errors.New("proto: Marshal called with nil"))
419 nbIdentity := &entities.NbIdentity{}
420 actualErr := w.SaveNodeb(nbIdentity, nil)
421 assert.Equal(t, expectedErr, actualErr)
424 func TestSaveUnknownTypeEntityFailure(t *testing.T) {
426 initSdlInstanceMock(namespace, 1)
428 expectedErr := common.NewValidationError(errors.New("#rNibWriter.saveNodeB - Unknown responding node type, entity: ip:\"localhost\" port:5656 "))
429 nbIdentity := &entities.NbIdentity{InventoryName:"name", GlobalNbId:&entities.GlobalNbId{PlmnId:"02f829", NbId:"4a952a0a"}}
430 nb := &entities.NodebInfo{}
433 actualErr := w.SaveNodeb(nbIdentity, nb)
434 assert.Equal(t, expectedErr, actualErr)
437 func TestSaveEntityFailure(t *testing.T) {
443 sdlInstanceMock := initSdlInstanceMock(namespace, 1)
445 gnb := entities.NodebInfo{}
446 gnb.NodeType = entities.Node_GNB
447 data, err := proto.Marshal(&gnb)
449 t.Errorf("#rNibWriter_test.TestSaveEntityFailure - Failed to marshal NodeB entity. Error: %v", err)
451 nbIdentity := &entities.NbIdentity{InventoryName:name, GlobalNbId:&entities.GlobalNbId{PlmnId:plmnId, NbId:nbId}}
452 setExpected := []interface{}{"RAN:" + name, data}
453 setExpected = append(setExpected,"GNB:" + plmnId + ":" + nbId, data)
454 expectedErr := errors.New("expected error")
455 sdlInstanceMock.On("Set", []interface{}{setExpected}).Return(expectedErr)
456 rNibErr := w.SaveNodeb(nbIdentity, &gnb)
457 assert.NotEmpty(t, rNibErr)
460 func TestGetRNibWriterPoolNotInitializedFailure(t *testing.T) {
462 assert.Panics(t, func(){GetRNibWriter()})
465 func TestGetRNibWriter(t *testing.T) {
467 initSdlInstanceMock(namespace, 1)
468 received := GetRNibWriter()
469 assert.NotEmpty(t, received)
470 available, created := writerPool.Stats()
471 assert.Equal(t, 0, available, "number of available objects in the writerPool should be 0")
472 assert.Equal(t, 1, created, "number of created objects in the writerPool should be 1")
476 func TestClose(t *testing.T) {
478 instanceMock := initSdlInstanceMock(namespace, 2)
479 w1 := GetRNibWriter()
480 w2 := GetRNibWriter()
483 available, created := writerPool.Stats()
484 assert.Equal(t, 2, available, "number of available objects in the writerPool should be 2")
485 assert.Equal(t, 2, created, "number of created objects in the writerPool should be 2")
487 instanceMock.On("Close").Return(e)
489 available, created = writerPool.Stats()
490 assert.Equal(t, 0, available, "number of available objects in the writerPool should be 0")
491 assert.Equal(t, 0, created, "number of created objects in the writerPool should be 0")
494 func TestCloseOnClosedPoolFailure(t *testing.T) {
496 instanceMock := initSdlInstanceMock(namespace, 1)
497 w1 := GetRNibWriter()
499 available, created := writerPool.Stats()
500 assert.Equal(t, 1, available, "number of available objects in the writerPool should be 1")
501 assert.Equal(t, 1, created, "number of created objects in the writerPool should be 1")
503 instanceMock.On("Close").Return(e)
505 assert.Panics(t, func(){Close()})
508 func TestCloseFailure(t *testing.T) {
510 instanceMock := initSdlInstanceMock(namespace, 2)
511 w1 := GetRNibWriter()
513 available, created := writerPool.Stats()
514 assert.Equal(t, 1, available, "number of available objects in the writerPool should be 1")
515 assert.Equal(t, 1, created, "number of created objects in the writerPool should be 1")
516 e := errors.New("expected error")
517 instanceMock.On("Close").Return(e)
519 available, created = writerPool.Stats()
520 assert.Equal(t, 0, available, "number of available objects in the writerPool should be 0")
521 assert.Equal(t, 0, created, "number of created objects in the writerPool should be 0")
524 func TestInit(t *testing.T) {
527 assert.NotNil(t, writerPool)
528 assert.NotNil(t, writerPool.New)
529 assert.NotNil(t, writerPool.Destroy)
530 available, created := writerPool.Stats()
531 assert.Equal(t, 0, available, "number of available objects in the writerPool should be 0")
532 assert.Equal(t, 0, created, "number of created objects in the writerPool should be 0")
537 //func TestSaveEnbInteg(t *testing.T){
538 // for i := 0; i<10; i++{
539 // Init("e2Manager", 1)
540 // w := GetRNibWriter()
541 // nb := entities.NodebInfo{}
542 // nb.NodeType = entities.Node_ENB
543 // nb.ConnectionStatus = entities.ConnectionStatus_CONNECTED
544 // nb.Ip = "localhost"
545 // nb.Port = uint32(5656 + i)
546 // enb := entities.Enb{}
547 // cell1 := &entities.ServedCellInfo{CellId:fmt.Sprintf("%02x",111 + i), Pci:uint32(11 + i)}
548 // cell2 := &entities.ServedCellInfo{CellId:fmt.Sprintf("%02x",222 + i), Pci:uint32(22 + i)}
549 // cell3 := &entities.ServedCellInfo{CellId:fmt.Sprintf("%02x",333 + i), Pci:uint32(33 + i)}
550 // enb.ServedCells = []*entities.ServedCellInfo{cell1, cell2, cell3}
551 // nb.Configuration = &entities.NodebInfo_Enb{Enb:&enb}
552 // plmnId := 0x02f828
553 // nbId := 0x4a952a0a
554 // nbIdentity := &entities.NbIdentity{InventoryName: fmt.Sprintf("nameEnb%d" ,i), GlobalNbId:&entities.GlobalNbId{PlmnId:fmt.Sprintf("%02x", plmnId + i), NbId:fmt.Sprintf("%02x", nbId + i)}}
555 // err := w.SaveNodeb(nbIdentity, &nb)
557 // t.Errorf("#rNibWriter_test.TestSaveEnbInteg - Failed to save NodeB entity. Error: %v", err)
560 // nb1 := entities.NodebInfo{}
561 // nb1.NodeType = entities.Node_GNB
562 // nb.ConnectionStatus = entities.ConnectionStatus_CONNECTED
563 // nb1.Ip = "localhost"
564 // nb1.Port = uint32(6565 + i)
565 // gnb := entities.Gnb{}
566 // gCell1 := &entities.ServedNRCell{ServedNrCellInformation:&entities.ServedNRCellInformation{CellId:fmt.Sprintf("%02x",1111 + i), NrPci:uint32(1 + i)}}
567 // gCell2 := &entities.ServedNRCell{ServedNrCellInformation:&entities.ServedNRCellInformation{CellId:fmt.Sprintf("%02x",2222 + i), NrPci:uint32(2 + i)}}
568 // gCell3 := &entities.ServedNRCell{ServedNrCellInformation:&entities.ServedNRCellInformation{CellId:fmt.Sprintf("%02x",3333 + i), NrPci:uint32(3 + i)}}
569 // gnb.ServedNrCells = []*entities.ServedNRCell{gCell1, gCell2, gCell3,}
570 // nb1.Configuration = &entities.NodebInfo_Gnb{Gnb:&gnb}
571 // nbIdentity = &entities.NbIdentity{InventoryName: fmt.Sprintf("nameGnb%d" ,i), GlobalNbId:&entities.GlobalNbId{PlmnId:fmt.Sprintf("%02x", plmnId - i), NbId:fmt.Sprintf("%02x", nbId - i)}}
572 // err = w.SaveNodeb(nbIdentity, &nb1)
574 // t.Errorf("#rNibWriter_test.TestSaveEnbInteg - Failed to save NodeB entity. Error: %v", err)
579 //func TestSaveRanLoadInformationInteg(t *testing.T){
580 // Init("e2Manager", 1)
581 // w := GetRNibWriter()
582 // ranLoadInformation := generateRanLoadInformation()
583 // err := w.SaveRanLoadInformation("ran_integ", ranLoadInformation)
585 // t.Errorf("#rNibWriter_test.TestSaveRanLoadInformationInteg - Failed to save RanLoadInformation entity. Error: %v", err)