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.
24 "gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/common"
25 "gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/entities"
26 "github.com/golang/protobuf/proto"
27 "github.com/stretchr/testify/assert"
32 func TestInitRNibWriter(t *testing.T) {
34 initSdlInstanceMock(namespace, 1)
35 available, created := writerPool.Stats()
36 assert.Equal(t, available, 0, "number of available objects in the writerPool should be 0")
37 assert.Equal(t, created, 0, "number of created objects in the writerPool should be 0")
42 func TestInitPool(t *testing.T) {
44 sdlInstanceMock := new(mocks.MockSdlInstance)
45 initPool(1, func() interface{} {
46 sdlI := common.ISdlInstance(sdlInstanceMock)
47 return &rNibWriterInstance{sdl: &sdlI, namespace: namespace}
49 func(obj interface{}) {
52 assert.NotNil(t, writerPool)
53 assert.NotNil(t, writerPool.New)
54 assert.NotNil(t, writerPool.Destroy)
55 available, created := writerPool.Stats()
56 assert.Equal(t, 0, available, "number of available objects in the writerPool should be 0")
57 assert.Equal(t, 0, created, "number of created objects in the writerPool should be 0")
60 var namespace = "namespace"
62 func initSdlInstanceMock(namespace string, poolSize int) *mocks.MockSdlInstance {
63 sdlInstanceMock := new(mocks.MockSdlInstance)
64 initPool(poolSize, func() interface{} {
65 sdlI := common.ISdlInstance(sdlInstanceMock)
66 return &rNibWriterInstance{sdl: &sdlI, namespace: namespace}
68 func(obj interface{}) {
71 return sdlInstanceMock
74 func TestSaveEnb(t *testing.T) {
76 ranName := "RAN:" + name
78 sdlInstanceMock := initSdlInstanceMock(namespace, 1)
80 nb := entities.NodebInfo{}
81 nb.NodeType = entities.Node_ENB
82 nb.ConnectionStatus = 1
86 cell := &entities.ServedCellInfo{CellId: "aaff", Pci: 3}
87 cellEntity := entities.Cell{Type: entities.Cell_LTE_CELL, Cell: &entities.Cell_ServedCellInfo{ServedCellInfo: cell}}
88 enb.ServedCells = []*entities.ServedCellInfo{cell}
89 nb.Configuration = &entities.NodebInfo_Enb{Enb: &enb}
90 data, err := proto.Marshal(&nb)
92 t.Errorf("#rNibWriter_test.TestSaveEnb - Failed to marshal NodeB entity. Error: %v", err)
96 cellData, err := proto.Marshal(&cellEntity)
98 t.Errorf("#rNibWriter_test.TestSaveEnb - Failed to marshal Cell entity. Error: %v", err)
100 var setExpected []interface{}
101 setExpected = append(setExpected, ranName, data)
102 setExpected = append(setExpected, "ENB:02f829:4a952a0a", data)
103 setExpected = append(setExpected, fmt.Sprintf("CELL:%s", cell.GetCellId()), cellData)
104 setExpected = append(setExpected, fmt.Sprintf("PCI:%s:%02x", name, cell.GetPci()), cellData)
106 sdlInstanceMock.On("Set", []interface{}{setExpected}).Return(e)
107 nbIdentity := &entities.NbIdentity{InventoryName: name, GlobalNbId: &entities.GlobalNbId{PlmnId: "02f829", NbId: "4a952a0a"}}
108 nbIdData, err := proto.Marshal(nbIdentity)
110 t.Errorf("#rNibWriter_test.TestSaveEnb - Failed to marshal NodeB Identity entity. Error: %v", err)
112 sdlInstanceMock.On("AddMember", "ENB", []interface{}{nbIdData}).Return(e)
113 rNibErr := w.SaveNodeb(nbIdentity, &nb)
114 assert.Nil(t, rNibErr)
117 func TestSaveEnbCellIdValidationFailure(t *testing.T) {
120 initSdlInstanceMock(namespace, 1)
122 nb := entities.NodebInfo{}
123 nb.NodeType = entities.Node_ENB
124 nb.ConnectionStatus = 1
127 enb := entities.Enb{}
128 cell := &entities.ServedCellInfo{Pci: 3}
129 enb.ServedCells = []*entities.ServedCellInfo{cell}
130 nb.Configuration = &entities.NodebInfo_Enb{Enb: &enb}
132 nbIdentity := &entities.NbIdentity{InventoryName: name, GlobalNbId: &entities.GlobalNbId{PlmnId: "02f829", NbId: "4a952a0a"}}
133 rNibErr := w.SaveNodeb(nbIdentity, &nb)
134 assert.NotNil(t, rNibErr)
135 assert.Equal(t, common.VALIDATION_ERROR, rNibErr.GetCode())
136 assert.Equal(t, "3 VALIDATION_ERROR - #utils.ValidateAndBuildCellIdKey - an empty cell id received", rNibErr.Error())
139 func TestSaveEnbInventoryNameValidationFailure(t *testing.T) {
141 initSdlInstanceMock(namespace, 1)
143 nb := entities.NodebInfo{}
144 nb.NodeType = entities.Node_ENB
145 nb.ConnectionStatus = 1
148 enb := entities.Enb{}
149 cell := &entities.ServedCellInfo{CellId: "aaa", Pci: 3}
150 enb.ServedCells = []*entities.ServedCellInfo{cell}
151 nb.Configuration = &entities.NodebInfo_Enb{Enb: &enb}
153 nbIdentity := &entities.NbIdentity{InventoryName: "", GlobalNbId: &entities.GlobalNbId{PlmnId: "02f829", NbId: "4a952a0a"}}
154 rNibErr := w.SaveNodeb(nbIdentity, &nb)
155 assert.NotNil(t, rNibErr)
156 assert.Equal(t, common.VALIDATION_ERROR, rNibErr.GetCode())
157 assert.Equal(t, "3 VALIDATION_ERROR - #utils.ValidateAndBuildNodeBNameKey - an empty inventory name received", rNibErr.Error())
160 func TestSaveEnbOnClosedPool(t *testing.T) {
163 sdlInstanceMock := initSdlInstanceMock(namespace, 1)
165 nb := entities.NodebInfo{}
166 nb.NodeType = entities.Node_ENB
167 nb.ConnectionStatus = 1
170 enb := entities.Enb{}
171 nb.Configuration = &entities.NodebInfo_Enb{Enb: &enb}
172 data, err := proto.Marshal(&nb)
174 t.Errorf("#rNibWriter_test.TestSaveEnbOnClosedPool - Failed to marshal NodeB entity. Error: %v", err)
176 setExpected := []interface{}{name, data}
178 sdlInstanceMock.On("Set", setExpected).Return(e)
180 nbIdentity := &entities.NbIdentity{}
181 assert.Panics(t, func() { w.SaveNodeb(nbIdentity, &nb) })
184 func TestSaveGnbCellIdValidationFailure(t *testing.T) {
187 initSdlInstanceMock(namespace, 1)
189 nb := entities.NodebInfo{}
190 nb.NodeType = entities.Node_GNB
191 nb.ConnectionStatus = 1
194 gnb := entities.Gnb{}
195 cellInfo := &entities.ServedNRCellInformation{NrPci: 2}
196 cell := &entities.ServedNRCell{ServedNrCellInformation: cellInfo}
197 gnb.ServedNrCells = []*entities.ServedNRCell{cell}
198 nb.Configuration = &entities.NodebInfo_Gnb{Gnb: &gnb}
200 nbIdentity := &entities.NbIdentity{InventoryName: name, GlobalNbId: &entities.GlobalNbId{PlmnId: "02f829", NbId: "4a952a0a"}}
201 rNibErr := w.SaveNodeb(nbIdentity, &nb)
202 assert.NotNil(t, rNibErr)
203 assert.Equal(t, common.VALIDATION_ERROR, rNibErr.GetCode())
204 assert.Equal(t, "3 VALIDATION_ERROR - #utils.ValidateAndBuildNrCellIdKey - an empty cell id received", rNibErr.Error())
207 func TestSaveGnb(t *testing.T) {
209 ranName := "RAN:" + name
211 sdlInstanceMock := initSdlInstanceMock(namespace, 1)
213 nb := entities.NodebInfo{}
214 nb.NodeType = entities.Node_GNB
215 nb.ConnectionStatus = 1
218 gnb := entities.Gnb{}
219 cellInfo := &entities.ServedNRCellInformation{NrPci: 2, CellId: "ccdd"}
220 cell := &entities.ServedNRCell{ServedNrCellInformation: cellInfo}
221 cellEntity := entities.Cell{Type: entities.Cell_NR_CELL, Cell: &entities.Cell_ServedNrCell{ServedNrCell: cell}}
222 gnb.ServedNrCells = []*entities.ServedNRCell{cell}
223 nb.Configuration = &entities.NodebInfo_Gnb{Gnb: &gnb}
224 data, err := proto.Marshal(&nb)
226 t.Errorf("#rNibWriter_test.TestSaveGnb - Failed to marshal NodeB entity. Error: %v", err)
230 cellData, err := proto.Marshal(&cellEntity)
232 t.Errorf("#rNibWriter_test.TestSaveGnb - Failed to marshal Cell entity. Error: %v", err)
234 var setExpected []interface{}
235 setExpected = append(setExpected, ranName, data)
236 setExpected = append(setExpected, "GNB:02f829:4a952a0a", data)
237 setExpected = append(setExpected, fmt.Sprintf("NRCELL:%s", cell.GetServedNrCellInformation().GetCellId()), cellData)
238 setExpected = append(setExpected, fmt.Sprintf("PCI:%s:%02x", name, cell.GetServedNrCellInformation().GetNrPci()), cellData)
240 sdlInstanceMock.On("Set", []interface{}{setExpected}).Return(e)
241 nbIdentity := &entities.NbIdentity{InventoryName: name, GlobalNbId: &entities.GlobalNbId{PlmnId: "02f829", NbId: "4a952a0a"}}
242 nbIdData, err := proto.Marshal(nbIdentity)
244 t.Errorf("#rNibWriter_test.TestSaveGnb - Failed to marshal NodeB Identity entity. Error: %v", err)
246 sdlInstanceMock.On("AddMember", "GNB", []interface{}{nbIdData}).Return(e)
248 rNibErr := w.SaveNodeb(nbIdentity, &nb)
249 assert.Nil(t, rNibErr)
252 func TestSaveRanLoadInformationSuccess(t *testing.T) {
253 inventoryName := "name"
254 loadKey, validationErr := common.ValidateAndBuildRanLoadInformationKey(inventoryName)
256 if validationErr != nil {
257 t.Errorf("#rNibWriter_test.TestSaveRanLoadInformationSuccess - Failed to build ran load infromation key. Error: %v", validationErr)
261 sdlInstanceMock := initSdlInstanceMock(namespace, 1)
264 ranLoadInformation := generateRanLoadInformation()
265 data, err := proto.Marshal(ranLoadInformation)
268 t.Errorf("#rNibWriter_test.TestSaveRanLoadInformation - Failed to marshal RanLoadInformation entity. Error: %v", err)
272 var setExpected []interface{}
273 setExpected = append(setExpected, loadKey, data)
274 sdlInstanceMock.On("Set", []interface{}{setExpected}).Return(e)
276 rNibErr := w.SaveRanLoadInformation(inventoryName, ranLoadInformation)
277 assert.Nil(t, rNibErr)
280 func TestSaveRanLoadInformationMarshalNilFailure(t *testing.T) {
281 inventoryName := "name2"
283 initSdlInstanceMock(namespace, 1)
286 expectedErr := common.NewInternalError(errors.New("proto: Marshal called with nil"))
287 err := w.SaveRanLoadInformation(inventoryName, nil)
288 assert.Equal(t, expectedErr, err)
291 func TestSaveRanLoadInformationEmptyInventoryNameFailure(t *testing.T) {
294 initSdlInstanceMock(namespace, 1)
297 err := w.SaveRanLoadInformation(inventoryName, nil)
298 assert.NotNil(t, err)
299 assert.Equal(t, common.VALIDATION_ERROR, err.GetCode())
302 func TestSaveRanLoadInformationSdlFailure(t *testing.T) {
303 inventoryName := "name2"
305 loadKey, validationErr := common.ValidateAndBuildRanLoadInformationKey(inventoryName)
307 if validationErr != nil {
308 t.Errorf("#rNibWriter_test.TestSaveRanLoadInformationSuccess - Failed to build ran load infromation key. Error: %v", validationErr)
312 sdlInstanceMock := initSdlInstanceMock(namespace, 1)
315 ranLoadInformation := generateRanLoadInformation()
316 data, err := proto.Marshal(ranLoadInformation)
319 t.Errorf("#rNibWriter_test.TestSaveRanLoadInformation - Failed to marshal RanLoadInformation entity. Error: %v", err)
322 expectedErr := errors.New("expected error")
323 var setExpected []interface{}
324 setExpected = append(setExpected, loadKey, data)
325 sdlInstanceMock.On("Set", []interface{}{setExpected}).Return(expectedErr)
327 rNibErr := w.SaveRanLoadInformation(inventoryName, ranLoadInformation)
328 assert.NotNil(t, rNibErr)
329 assert.Equal(t, common.INTERNAL_ERROR, rNibErr.GetCode())
330 assert.Equal(t, expectedErr, rNibErr.GetError())
333 func generateCellLoadInformation() *entities.CellLoadInformation {
334 cellLoadInformation := entities.CellLoadInformation{}
336 cellLoadInformation.CellId = "123"
338 ulInterferenceOverloadIndication := entities.UlInterferenceOverloadIndication_HIGH_INTERFERENCE
339 cellLoadInformation.UlInterferenceOverloadIndications = []entities.UlInterferenceOverloadIndication{ulInterferenceOverloadIndication}
341 ulHighInterferenceInformation := entities.UlHighInterferenceInformation{
343 UlHighInterferenceIndication: "xxx",
346 cellLoadInformation.UlHighInterferenceInfos = []*entities.UlHighInterferenceInformation{&ulHighInterferenceInformation}
348 cellLoadInformation.RelativeNarrowbandTxPower = &entities.RelativeNarrowbandTxPower{
350 RntpThreshold: entities.RntpThreshold_NEG_4,
351 NumberOfCellSpecificAntennaPorts: entities.NumberOfCellSpecificAntennaPorts_V1_ANT_PRT,
353 PdcchInterferenceImpact: 2,
354 EnhancedRntp: &entities.EnhancedRntp{
355 EnhancedRntpBitmap: "xxx",
356 RntpHighPowerThreshold: entities.RntpThreshold_NEG_2,
357 EnhancedRntpStartTime: &entities.StartTime{StartSfn: 500, StartSubframeNumber: 5},
361 cellLoadInformation.AbsInformation = &entities.AbsInformation{
362 Mode: entities.AbsInformationMode_ABS_INFO_FDD,
363 AbsPatternInfo: "xxx",
364 NumberOfCellSpecificAntennaPorts: entities.NumberOfCellSpecificAntennaPorts_V2_ANT_PRT,
365 MeasurementSubset: "xxx",
368 cellLoadInformation.InvokeIndication = entities.InvokeIndication_ABS_INFORMATION
370 cellLoadInformation.ExtendedUlInterferenceOverloadInfo = &entities.ExtendedUlInterferenceOverloadInfo{
371 AssociatedSubframes: "xxx",
372 ExtendedUlInterferenceOverloadIndications: cellLoadInformation.UlInterferenceOverloadIndications,
375 compInformationItem := &entities.CompInformationItem{
376 CompHypothesisSets: []*entities.CompHypothesisSet{&entities.CompHypothesisSet{CellId: "789", CompHypothesis: "xxx"}},
380 cellLoadInformation.CompInformation = &entities.CompInformation{
381 CompInformationItems: []*entities.CompInformationItem{compInformationItem},
382 CompInformationStartTime: &entities.StartTime{StartSfn: 123, StartSubframeNumber: 456},
385 cellLoadInformation.DynamicDlTransmissionInformation = &entities.DynamicDlTransmissionInformation{
386 State: entities.NaicsState_NAICS_ACTIVE,
387 TransmissionModes: "xxx",
389 PAList: []entities.PA{entities.PA_DB_NEG_3},
392 return &cellLoadInformation
395 func generateRanLoadInformation() *entities.RanLoadInformation {
396 ranLoadInformation := entities.RanLoadInformation{}
398 ranLoadInformation.LoadTimestamp = uint64(time.Now().UnixNano())
400 cellLoadInformation := generateCellLoadInformation()
401 ranLoadInformation.CellLoadInfos = []*entities.CellLoadInformation{cellLoadInformation}
403 return &ranLoadInformation
406 func TestSaveNilEntityFailure(t *testing.T) {
408 initSdlInstanceMock(namespace, 1)
410 expectedErr := common.NewInternalError(errors.New("proto: Marshal called with nil"))
411 nbIdentity := &entities.NbIdentity{}
412 actualErr := w.SaveNodeb(nbIdentity, nil)
413 assert.Equal(t, expectedErr, actualErr)
416 func TestSaveUnknownTypeEntityFailure(t *testing.T) {
418 initSdlInstanceMock(namespace, 1)
420 expectedErr := common.NewValidationError(errors.New("#rNibWriter.saveNodeB - Unknown responding node type, entity: ip:\"localhost\" port:5656 "))
421 nbIdentity := &entities.NbIdentity{InventoryName: "name", GlobalNbId: &entities.GlobalNbId{PlmnId: "02f829", NbId: "4a952a0a"}}
422 nb := &entities.NodebInfo{}
425 actualErr := w.SaveNodeb(nbIdentity, nb)
426 assert.Equal(t, expectedErr, actualErr)
429 func TestSaveEntityFailure(t *testing.T) {
435 sdlInstanceMock := initSdlInstanceMock(namespace, 1)
437 gnb := entities.NodebInfo{}
438 gnb.NodeType = entities.Node_GNB
439 data, err := proto.Marshal(&gnb)
441 t.Errorf("#rNibWriter_test.TestSaveEntityFailure - Failed to marshal NodeB entity. Error: %v", err)
443 nbIdentity := &entities.NbIdentity{InventoryName: name, GlobalNbId: &entities.GlobalNbId{PlmnId: plmnId, NbId: nbId}}
444 setExpected := []interface{}{"RAN:" + name, data}
445 setExpected = append(setExpected, "GNB:"+plmnId+":"+nbId, data)
446 expectedErr := errors.New("expected error")
447 sdlInstanceMock.On("Set", []interface{}{setExpected}).Return(expectedErr)
448 rNibErr := w.SaveNodeb(nbIdentity, &gnb)
449 assert.NotEmpty(t, rNibErr)
452 func TestGetRNibWriterPoolNotInitializedFailure(t *testing.T) {
454 assert.Panics(t, func() { GetRNibWriter() })
457 func TestGetRNibWriter(t *testing.T) {
459 initSdlInstanceMock(namespace, 1)
460 received := GetRNibWriter()
461 assert.NotEmpty(t, received)
462 available, created := writerPool.Stats()
463 assert.Equal(t, 0, available, "number of available objects in the writerPool should be 0")
464 assert.Equal(t, 1, created, "number of created objects in the writerPool should be 1")
468 func TestClose(t *testing.T) {
470 instanceMock := initSdlInstanceMock(namespace, 2)
471 w1 := GetRNibWriter()
472 w2 := GetRNibWriter()
475 available, created := writerPool.Stats()
476 assert.Equal(t, 2, available, "number of available objects in the writerPool should be 2")
477 assert.Equal(t, 2, created, "number of created objects in the writerPool should be 2")
479 instanceMock.On("Close").Return(e)
481 available, created = writerPool.Stats()
482 assert.Equal(t, 0, available, "number of available objects in the writerPool should be 0")
483 assert.Equal(t, 0, created, "number of created objects in the writerPool should be 0")
486 func TestCloseOnClosedPoolFailure(t *testing.T) {
488 instanceMock := initSdlInstanceMock(namespace, 1)
489 w1 := GetRNibWriter()
491 available, created := writerPool.Stats()
492 assert.Equal(t, 1, available, "number of available objects in the writerPool should be 1")
493 assert.Equal(t, 1, created, "number of created objects in the writerPool should be 1")
495 instanceMock.On("Close").Return(e)
497 assert.Panics(t, func() { Close() })
500 func TestCloseFailure(t *testing.T) {
502 instanceMock := initSdlInstanceMock(namespace, 2)
503 w1 := GetRNibWriter()
505 available, created := writerPool.Stats()
506 assert.Equal(t, 1, available, "number of available objects in the writerPool should be 1")
507 assert.Equal(t, 1, created, "number of created objects in the writerPool should be 1")
508 e := errors.New("expected error")
509 instanceMock.On("Close").Return(e)
511 available, created = writerPool.Stats()
512 assert.Equal(t, 0, available, "number of available objects in the writerPool should be 0")
513 assert.Equal(t, 0, created, "number of created objects in the writerPool should be 0")
516 func TestInit(t *testing.T) {
519 assert.NotNil(t, writerPool)
520 assert.NotNil(t, writerPool.New)
521 assert.NotNil(t, writerPool.Destroy)
522 available, created := writerPool.Stats()
523 assert.Equal(t, 0, available, "number of available objects in the writerPool should be 0")
524 assert.Equal(t, 0, created, "number of created objects in the writerPool should be 0")
529 //func TestSaveEnbInteg(t *testing.T){
530 // for i := 0; i<10; i++{
531 // Init("e2Manager", 1)
532 // w := GetRNibWriter()
533 // nb := entities.NodebInfo{}
534 // nb.NodeType = entities.Node_ENB
535 // nb.ConnectionStatus = entities.ConnectionStatus_CONNECTED
536 // nb.Ip = "localhost"
537 // nb.Port = uint32(5656 + i)
538 // enb := entities.Enb{}
539 // cell1 := &entities.ServedCellInfo{CellId:fmt.Sprintf("%02x",111 + i), Pci:uint32(11 + i)}
540 // cell2 := &entities.ServedCellInfo{CellId:fmt.Sprintf("%02x",222 + i), Pci:uint32(22 + i)}
541 // cell3 := &entities.ServedCellInfo{CellId:fmt.Sprintf("%02x",333 + i), Pci:uint32(33 + i)}
542 // enb.ServedCells = []*entities.ServedCellInfo{cell1, cell2, cell3}
543 // nb.Configuration = &entities.NodebInfo_Enb{Enb:&enb}
544 // plmnId := 0x02f828
545 // nbId := 0x4a952a0a
546 // nbIdentity := &entities.NbIdentity{InventoryName: fmt.Sprintf("nameEnb%d" ,i), GlobalNbId:&entities.GlobalNbId{PlmnId:fmt.Sprintf("%02x", plmnId + i), NbId:fmt.Sprintf("%02x", nbId + i)}}
547 // err := w.SaveNodeb(nbIdentity, &nb)
549 // t.Errorf("#rNibWriter_test.TestSaveEnbInteg - Failed to save NodeB entity. Error: %v", err)
552 // nb1 := entities.NodebInfo{}
553 // nb1.NodeType = entities.Node_GNB
554 // nb.ConnectionStatus = entities.ConnectionStatus_CONNECTED
555 // nb1.Ip = "localhost"
556 // nb1.Port = uint32(6565 + i)
557 // gnb := entities.Gnb{}
558 // gCell1 := &entities.ServedNRCell{ServedNrCellInformation:&entities.ServedNRCellInformation{CellId:fmt.Sprintf("%02x",1111 + i), NrPci:uint32(1 + i)}}
559 // gCell2 := &entities.ServedNRCell{ServedNrCellInformation:&entities.ServedNRCellInformation{CellId:fmt.Sprintf("%02x",2222 + i), NrPci:uint32(2 + i)}}
560 // gCell3 := &entities.ServedNRCell{ServedNrCellInformation:&entities.ServedNRCellInformation{CellId:fmt.Sprintf("%02x",3333 + i), NrPci:uint32(3 + i)}}
561 // gnb.ServedNrCells = []*entities.ServedNRCell{gCell1, gCell2, gCell3,}
562 // nb1.Configuration = &entities.NodebInfo_Gnb{Gnb:&gnb}
563 // nbIdentity = &entities.NbIdentity{InventoryName: fmt.Sprintf("nameGnb%d" ,i), GlobalNbId:&entities.GlobalNbId{PlmnId:fmt.Sprintf("%02x", plmnId - i), NbId:fmt.Sprintf("%02x", nbId - i)}}
564 // err = w.SaveNodeb(nbIdentity, &nb1)
566 // t.Errorf("#rNibWriter_test.TestSaveEnbInteg - Failed to save NodeB entity. Error: %v", err)
571 //func TestSaveRanLoadInformationInteg(t *testing.T){
572 // Init("e2Manager", 1)
573 // w := GetRNibWriter()
574 // ranLoadInformation := generateRanLoadInformation()
575 // err := w.SaveRanLoadInformation("ran_integ", ranLoadInformation)
577 // t.Errorf("#rNibWriter_test.TestSaveRanLoadInformationInteg - Failed to save RanLoadInformation entity. Error: %v", err)