Change-Id: I9fe7af46a72286131589ab27ba19424ec62cacc4
Signed-off-by: ss412g <shuky.har-noy@intl.att.com>
readerPool = common.NewPool(poolSize, newObj, destroyObj)
}
readerPool = common.NewPool(poolSize, newObj, destroyObj)
}
+/*
+GetRNibReader returns reference to RNibReader
+*/
+func GetRNibReader() RNibReader {
+ return &rNibReaderInstance{}
+}
+
+
func (*rNibReaderInstance) GetNodeb(inventoryName string) (*entities.NodebInfo, error) {
w := readerPool.Get().(*rNibReaderInstance)
defer readerPool.Put(w)
func (*rNibReaderInstance) GetNodeb(inventoryName string) (*entities.NodebInfo, error) {
w := readerPool.Get().(*rNibReaderInstance)
defer readerPool.Put(w)
name := "name"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
name := "name"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
nb := entities.NodebInfo{}
nb.ConnectionStatus = 1
nb.Ip = "localhost"
nb := entities.NodebInfo{}
nb.ConnectionStatus = 1
nb.Ip = "localhost"
name := "name"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
name := "name"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
var e error
var ret map[string]interface{}
redisKey, rNibErr := common.ValidateAndBuildNodeBNameKey(name)
var e error
var ret map[string]interface{}
redisKey, rNibErr := common.ValidateAndBuildNodeBNameKey(name)
name := "name"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
name := "name"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
var e error
ret := make(map[string]interface{}, 1)
redisKey, rNibErr := common.ValidateAndBuildNodeBNameKey(name)
var e error
ret := make(map[string]interface{}, 1)
redisKey, rNibErr := common.ValidateAndBuildNodeBNameKey(name)
errMsgExpected := "expected Sdlgo error"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
errMsgExpected := "expected Sdlgo error"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
e := errors.New(errMsg)
var ret map[string]interface{}
redisKey, rNibErr := common.ValidateAndBuildNodeBNameKey(name)
e := errors.New(errMsg)
var ret map[string]interface{}
redisKey, rNibErr := common.ValidateAndBuildNodeBNameKey(name)
name := "name"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
name := "name"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
nb := entities.NodebInfo{}
nb.ConnectionStatus = 1
nb.Ip = "localhost"
nb := entities.NodebInfo{}
nb.ConnectionStatus = 1
nb.Ip = "localhost"
name := "name"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
name := "name"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
nb := entities.NodebInfo{}
nb.ConnectionStatus = 1
nb.Ip = "localhost"
nb := entities.NodebInfo{}
nb.ConnectionStatus = 1
nb.Ip = "localhost"
name := "name"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
name := "name"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
var e error
ret := make(map[string]interface{}, 1)
redisKey, rNibErr := common.ValidateAndBuildNodeBNameKey(name)
var e error
ret := make(map[string]interface{}, 1)
redisKey, rNibErr := common.ValidateAndBuildNodeBNameKey(name)
name := "name"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
name := "name"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
var e error
var ret map[string]interface{}
redisKey, rNibErr := common.ValidateAndBuildNodeBNameKey(name)
var e error
var ret map[string]interface{}
redisKey, rNibErr := common.ValidateAndBuildNodeBNameKey(name)
name := "name"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
name := "name"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
nb := entities.NodebInfo{}
nb.ConnectionStatus = 1
nb.Ip = "localhost"
nb := entities.NodebInfo{}
nb.ConnectionStatus = 1
nb.Ip = "localhost"
name := "name"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
name := "name"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
nb := entities.NodebInfo{}
nb.ConnectionStatus = 1
nb.Ip = "localhost"
nb := entities.NodebInfo{}
nb.ConnectionStatus = 1
nb.Ip = "localhost"
func TestCloseOnClosedPoolFailure(t *testing.T) {
readerPool = nil
instanceMock := initSdlInstanceMock(namespace, 1)
func TestCloseOnClosedPoolFailure(t *testing.T) {
readerPool = nil
instanceMock := initSdlInstanceMock(namespace, 1)
- w1 := &rNibReaderInstance{}
_, err := w1.GetNodeb("")
if err == nil{
t.Errorf("#rNibReader_test.TestCloseOnClosedPoolFailure - failed to validate key parameter")
_, err := w1.GetNodeb("")
if err == nil{
t.Errorf("#rNibReader_test.TestCloseOnClosedPoolFailure - failed to validate key parameter")
func TestCloseFailure(t *testing.T) {
readerPool = nil
instanceMock := initSdlInstanceMock(namespace, 2)
func TestCloseFailure(t *testing.T) {
readerPool = nil
instanceMock := initSdlInstanceMock(namespace, 2)
- w1 := &rNibReaderInstance{}
_, err := w1.GetNodeb("")
if err == nil{
t.Errorf("#rNibReader_test.TestCloseFailure - failed to validate key parameter")
_, err := w1.GetNodeb("")
if err == nil{
t.Errorf("#rNibReader_test.TestCloseFailure - failed to validate key parameter")
func TestGetListGnbIdsUnmarshalFailure(t *testing.T) {
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
func TestGetListGnbIdsUnmarshalFailure(t *testing.T) {
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
var e error
sdlInstanceMock.On("GetMembers", entities.Node_GNB.String()).Return([]string{"data"}, e)
ids, er := w.GetListGnbIds()
var e error
sdlInstanceMock.On("GetMembers", entities.Node_GNB.String()).Return([]string{"data"}, e)
ids, er := w.GetListGnbIds()
errMsgExpected := "expected Sdlgo error"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
errMsgExpected := "expected Sdlgo error"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
e := errors.New(errMsg)
var data []string
sdlInstanceMock.On("GetMembers", entities.Node_GNB.String()).Return(data, e)
e := errors.New(errMsg)
var data []string
sdlInstanceMock.On("GetMembers", entities.Node_GNB.String()).Return(data, e)
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
name := "name"
plmnId := "02f829"
name := "name"
plmnId := "02f829"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
name := "name"
plmnId := "02f829"
name := "name"
plmnId := "02f829"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
var nilError error
name := "name"
var nilError error
name := "name"
func TestGetListEnbIdsUnmarshalFailure(t *testing.T) {
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
func TestGetListEnbIdsUnmarshalFailure(t *testing.T) {
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
var e error
sdlInstanceMock.On("GetMembers", entities.Node_ENB.String()).Return([]string{"data"}, e)
ids, er := w.GetListEnbIds()
var e error
sdlInstanceMock.On("GetMembers", entities.Node_ENB.String()).Return([]string{"data"}, e)
ids, er := w.GetListEnbIds()
nbId := "4a952a0a"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
nbId := "4a952a0a"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
nbIdentity := &entities.NbIdentity{InventoryName: name, GlobalNbId: &entities.GlobalNbId{PlmnId: plmnId, NbId: nbId}}
var e error
data, err := proto.Marshal(nbIdentity)
nbIdentity := &entities.NbIdentity{InventoryName: name, GlobalNbId: &entities.GlobalNbId{PlmnId: plmnId, NbId: nbId}}
var e error
data, err := proto.Marshal(nbIdentity)
func TestGetListEnbIdsNoIds(t *testing.T) {
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
func TestGetListEnbIdsNoIds(t *testing.T) {
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
var e error
sdlInstanceMock.On("GetMembers", entities.Node_ENB.String()).Return([]string{}, e)
ids, er := w.GetListEnbIds()
var e error
sdlInstanceMock.On("GetMembers", entities.Node_ENB.String()).Return([]string{}, e)
ids, er := w.GetListEnbIds()
listSize := 3
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
listSize := 3
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
idsData := make([]string, listSize)
idsEntities := make([]*entities.NbIdentity, listSize)
for i := 0; i < listSize; i++ {
idsData := make([]string, listSize)
idsEntities := make([]*entities.NbIdentity, listSize)
for i := 0; i < listSize; i++ {
nbId := "4a952a0a"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
nbId := "4a952a0a"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
nbIdentity := &entities.NbIdentity{InventoryName: name, GlobalNbId: &entities.GlobalNbId{PlmnId: plmnId, NbId: nbId}}
var e error
data, err := proto.Marshal(nbIdentity)
nbIdentity := &entities.NbIdentity{InventoryName: name, GlobalNbId: &entities.GlobalNbId{PlmnId: plmnId, NbId: nbId}}
var e error
data, err := proto.Marshal(nbIdentity)
func TestGetListGnbIdsNoIds(t *testing.T) {
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
func TestGetListGnbIdsNoIds(t *testing.T) {
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
var e error
sdlInstanceMock.On("GetMembers", entities.Node_GNB.String()).Return([]string{}, e)
ids, er := w.GetListGnbIds()
var e error
sdlInstanceMock.On("GetMembers", entities.Node_GNB.String()).Return([]string{}, e)
ids, er := w.GetListGnbIds()
listSize := 3
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
listSize := 3
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
idsData := make([]string, listSize)
idsEntities := make([]*entities.NbIdentity, listSize)
for i := 0; i < listSize; i++ {
idsData := make([]string, listSize)
idsEntities := make([]*entities.NbIdentity, listSize)
for i := 0; i < listSize; i++ {
errMsgExpected := "expected Sdlgo error"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
errMsgExpected := "expected Sdlgo error"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
e := errors.New(errMsg)
var data []string
sdlInstanceMock.On("GetMembers", entities.Node_ENB.String()).Return(data, e)
e := errors.New(errMsg)
var data []string
sdlInstanceMock.On("GetMembers", entities.Node_ENB.String()).Return(data, e)
func TestGetCountGnbListOneId(t *testing.T) {
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
func TestGetCountGnbListOneId(t *testing.T) {
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
var e error
sdlInstanceMock.On("GroupSize", entities.Node_GNB.String()).Return(1, e)
count, er := w.GetCountGnbList()
var e error
sdlInstanceMock.On("GroupSize", entities.Node_GNB.String()).Return(1, e)
count, er := w.GetCountGnbList()
func TestGetCountGnbList(t *testing.T) {
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
func TestGetCountGnbList(t *testing.T) {
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
var e error
sdlInstanceMock.On("GroupSize", entities.Node_GNB.String()).Return(3, e)
count, er := w.GetCountGnbList()
var e error
sdlInstanceMock.On("GroupSize", entities.Node_GNB.String()).Return(3, e)
count, er := w.GetCountGnbList()
errMsgExpected := "expected Sdlgo error"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
errMsgExpected := "expected Sdlgo error"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
e := errors.New(errMsg)
var count int
sdlInstanceMock.On("GroupSize", entities.Node_GNB.String()).Return(count, e)
e := errors.New(errMsg)
var count int
sdlInstanceMock.On("GroupSize", entities.Node_GNB.String()).Return(count, e)
var pci uint32 = 10
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
var pci uint32 = 10
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
cellEntity := entities.Cell{Type: entities.Cell_LTE_CELL, Cell: &entities.Cell_ServedCellInfo{ServedCellInfo: &entities.ServedCellInfo{Pci: pci}}}
cellData, err := proto.Marshal(&cellEntity)
if err != nil {
cellEntity := entities.Cell{Type: entities.Cell_LTE_CELL, Cell: &entities.Cell_ServedCellInfo{ServedCellInfo: &entities.ServedCellInfo{Pci: pci}}}
cellData, err := proto.Marshal(&cellEntity)
if err != nil {
var pci uint32
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
var pci uint32
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
var e error
var ret map[string]interface{}
key, rNibErr := common.ValidateAndBuildCellNamePciKey(name, pci)
var e error
var ret map[string]interface{}
key, rNibErr := common.ValidateAndBuildCellNamePciKey(name, pci)
var pci uint32
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
var pci uint32
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
var e error
ret := make(map[string]interface{}, 1)
key, rNibErr := common.ValidateAndBuildCellNamePciKey(name, pci)
var e error
ret := make(map[string]interface{}, 1)
key, rNibErr := common.ValidateAndBuildCellNamePciKey(name, pci)
errMsgExpected := "expected Sdlgo error"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
errMsgExpected := "expected Sdlgo error"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
e := errors.New(errMsg)
var ret map[string]interface{}
key, rNibErr := common.ValidateAndBuildCellNamePciKey(name, pci)
e := errors.New(errMsg)
var ret map[string]interface{}
key, rNibErr := common.ValidateAndBuildCellNamePciKey(name, pci)
func TestGetNodebById(t *testing.T) {
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
func TestGetNodebById(t *testing.T) {
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
nb := entities.NodebInfo{NodeType: entities.Node_ENB}
nb.ConnectionStatus = 1
nb.Ip = "localhost"
nb := entities.NodebInfo{NodeType: entities.Node_ENB}
nb.ConnectionStatus = 1
nb.Ip = "localhost"
nbId := "4a952a0a"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
nbId := "4a952a0a"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
var e error
key, rNibErr := common.ValidateAndBuildNodeBIdKey(entities.Node_ENB.String(), plmnId, nbId)
if rNibErr != nil {
var e error
key, rNibErr := common.ValidateAndBuildNodeBIdKey(entities.Node_ENB.String(), plmnId, nbId)
if rNibErr != nil {
nbId := "4a952a0a"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
nbId := "4a952a0a"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
var e error
key, rNibErr := common.ValidateAndBuildNodeBIdKey(entities.Node_GNB.String(), plmnId, nbId)
if rNibErr != nil {
var e error
key, rNibErr := common.ValidateAndBuildNodeBIdKey(entities.Node_GNB.String(), plmnId, nbId)
if rNibErr != nil {
nbId := "4a952a0a"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
nbId := "4a952a0a"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
key, rNibErr := common.ValidateAndBuildNodeBIdKey(entities.Node_ENB.String(), plmnId, nbId)
if rNibErr != nil {
t.Errorf("Failed to validate nodeb identity, plmnId: %s, nbId: %s", plmnId, nbId)
key, rNibErr := common.ValidateAndBuildNodeBIdKey(entities.Node_ENB.String(), plmnId, nbId)
if rNibErr != nil {
t.Errorf("Failed to validate nodeb identity, plmnId: %s, nbId: %s", plmnId, nbId)
errMsgExpected := "expected Sdlgo error"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
errMsgExpected := "expected Sdlgo error"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
key, rNibErr := common.ValidateAndBuildNodeBIdKey(entities.Node_GNB.String(), plmnId, nbId)
if rNibErr != nil {
t.Errorf("Failed to validate nodeb identity, plmnId: %s, nbId: %s", plmnId, nbId)
key, rNibErr := common.ValidateAndBuildNodeBIdKey(entities.Node_GNB.String(), plmnId, nbId)
if rNibErr != nil {
t.Errorf("Failed to validate nodeb identity, plmnId: %s, nbId: %s", plmnId, nbId)
var pci uint32 = 10
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
var pci uint32 = 10
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
cellEntity := entities.Cell{Type: entities.Cell_LTE_CELL, Cell: &entities.Cell_ServedCellInfo{ServedCellInfo: &entities.ServedCellInfo{Pci: pci}}}
cellData, err := proto.Marshal(&cellEntity)
if err != nil {
cellEntity := entities.Cell{Type: entities.Cell_LTE_CELL, Cell: &entities.Cell_ServedCellInfo{ServedCellInfo: &entities.ServedCellInfo{Pci: pci}}}
cellData, err := proto.Marshal(&cellEntity)
if err != nil {
cellId := "bbbb"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
cellId := "bbbb"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
var e error
var ret map[string]interface{}
key, rNibErr := common.ValidateAndBuildCellIdKey(cellId)
var e error
var ret map[string]interface{}
key, rNibErr := common.ValidateAndBuildCellIdKey(cellId)
cellId := "bbbb"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
cellId := "bbbb"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
var e error
var ret map[string]interface{}
key, rNibErr := common.ValidateAndBuildNrCellIdKey(cellId)
var e error
var ret map[string]interface{}
key, rNibErr := common.ValidateAndBuildNrCellIdKey(cellId)
cellId := "dddd"
readerPool = nil
initSdlInstanceMock(namespace, 1)
cellId := "dddd"
readerPool = nil
initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
cell, er := w.GetCellById(5, cellId)
assert.NotNil(t, er)
assert.Nil(t, cell)
cell, er := w.GetCellById(5, cellId)
assert.NotNil(t, er)
assert.Nil(t, cell)
cellId := ""
readerPool = nil
initSdlInstanceMock(namespace, 1)
cellId := ""
readerPool = nil
initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
cell, er := w.GetCellById(entities.Cell_NR_CELL, cellId)
assert.NotNil(t, er)
assert.Nil(t, cell)
cell, er := w.GetCellById(entities.Cell_NR_CELL, cellId)
assert.NotNil(t, er)
assert.Nil(t, cell)
cellId := ""
readerPool = nil
initSdlInstanceMock(namespace, 1)
cellId := ""
readerPool = nil
initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
cell, er := w.GetCellById(entities.Cell_LTE_CELL, cellId)
assert.NotNil(t, er)
assert.Nil(t, cell)
cell, er := w.GetCellById(entities.Cell_LTE_CELL, cellId)
assert.NotNil(t, er)
assert.Nil(t, cell)
name := "name"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
name := "name"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
loadInfo := generateRanLoadInformation()
var e error
data, err := proto.Marshal(loadInfo)
loadInfo := generateRanLoadInformation()
var e error
data, err := proto.Marshal(loadInfo)
name := ""
readerPool = nil
initSdlInstanceMock(namespace, 1)
name := ""
readerPool = nil
initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
getNb, er := w.GetRanLoadInformation(name)
assert.NotNil(t, er)
assert.Nil(t, getNb)
getNb, er := w.GetRanLoadInformation(name)
assert.NotNil(t, er)
assert.Nil(t, getNb)
name := "name"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
name := "name"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
var e error
var ret map[string]interface{}
redisKey, rNibErr := common.ValidateAndBuildRanLoadInformationKey(name)
var e error
var ret map[string]interface{}
redisKey, rNibErr := common.ValidateAndBuildRanLoadInformationKey(name)
name := "name"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
name := "name"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
var e error
ret := make(map[string]interface{}, 1)
redisKey, rNibErr := common.ValidateAndBuildRanLoadInformationKey(name)
var e error
ret := make(map[string]interface{}, 1)
redisKey, rNibErr := common.ValidateAndBuildRanLoadInformationKey(name)
errMsgExpected := "expected Sdlgo error"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
errMsgExpected := "expected Sdlgo error"
readerPool = nil
sdlInstanceMock := initSdlInstanceMock(namespace, 1)
- w := &rNibReaderInstance{}
e := errors.New(errMsg)
var ret map[string]interface{}
redisKey, rNibErr := common.ValidateAndBuildRanLoadInformationKey(name)
e := errors.New(errMsg)
var ret map[string]interface{}
redisKey, rNibErr := common.ValidateAndBuildRanLoadInformationKey(name)
//func TestGetEnbInteg(t *testing.T){
// name := "nameEnb1"
// Init("namespace", 1)
//func TestGetEnbInteg(t *testing.T){
// name := "nameEnb1"
// Init("namespace", 1)
-// w := &rNibReaderInstance{}
// nb, err := w.GetNodeb(name)
// if err != nil{
// fmt.Println(err)
// nb, err := w.GetNodeb(name)
// if err != nil{
// fmt.Println(err)
//func TestGetEnbCellsInteg(t *testing.T){
// name := "nameEnb1"
// Init("namespace", 1)
//func TestGetEnbCellsInteg(t *testing.T){
// name := "nameEnb1"
// Init("namespace", 1)
-// w := &rNibReaderInstance{}
// cells, err := w.GetCellList(name)
// if err != nil{
// fmt.Println(err)
// cells, err := w.GetCellList(name)
// if err != nil{
// fmt.Println(err)
//func TestGetGnbInteg(t *testing.T){
// name := "nameGnb1"
// Init("namespace", 1)
//func TestGetGnbInteg(t *testing.T){
// name := "nameGnb1"
// Init("namespace", 1)
-// w := &rNibReaderInstance{}
// nb, err := w.GetNodeb(name)
// if err != nil{
// fmt.Println(err)
// nb, err := w.GetNodeb(name)
// if err != nil{
// fmt.Println(err)
//func TestGetGnbCellsInteg(t *testing.T){
// name := "nameGnb1"
// Init("namespace", 1)
//func TestGetGnbCellsInteg(t *testing.T){
// name := "nameGnb1"
// Init("namespace", 1)
-// w := &rNibReaderInstance{}
// cells, err := w.GetCellList(name)
// if err != nil{
// fmt.Println(err)
// cells, err := w.GetCellList(name)
// if err != nil{
// fmt.Println(err)
//
//func TestGetListEnbIdsInteg(t *testing.T) {
// Init("namespace", 1)
//
//func TestGetListEnbIdsInteg(t *testing.T) {
// Init("namespace", 1)
-// w := &rNibReaderInstance{}
// ids, err := w.GetListEnbIds()
// if err != nil{
// fmt.Println(err)
// ids, err := w.GetListEnbIds()
// if err != nil{
// fmt.Println(err)
//
//func TestGetListGnbIdsInteg(t *testing.T) {
// Init("namespace", 1)
//
//func TestGetListGnbIdsInteg(t *testing.T) {
// Init("namespace", 1)
-// w := &rNibReaderInstance{}
// ids, err := w.GetListGnbIds()
// if err != nil{
// fmt.Println(err)
// ids, err := w.GetListGnbIds()
// if err != nil{
// fmt.Println(err)
//
//func TestGetCountGnbListInteg(t *testing.T) {
// Init("namespace", 1)
//
//func TestGetCountGnbListInteg(t *testing.T) {
// Init("namespace", 1)
-// w := &rNibReaderInstance{}
// count, err := w.GetCountGnbList()
// if err != nil{
// fmt.Println(err)
// count, err := w.GetCountGnbList()
// if err != nil{
// fmt.Println(err)
// name := "nameGnb7"
// pci := 0x0a
// Init("namespace", 1)
// name := "nameGnb7"
// pci := 0x0a
// Init("namespace", 1)
-// w := &rNibReaderInstance{}
// cell, err := w.GetCell(name, uint32(pci))
// if err != nil{
// fmt.Println(err)
// cell, err := w.GetCell(name, uint32(pci))
// if err != nil{
// fmt.Println(err)
// name := "nameEnb1"
// pci := 0x22
// Init("namespace", 1)
// name := "nameEnb1"
// pci := 0x22
// Init("namespace", 1)
-// w := &rNibReaderInstance{}
// cell, err := w.GetCell(name, uint32(pci))
// if err != nil {
// fmt.Println(err)
// cell, err := w.GetCell(name, uint32(pci))
// if err != nil {
// fmt.Println(err)
//
//func TestGetEnbCellByIdInteg(t *testing.T){
// Init("namespace", 1)
//
//func TestGetEnbCellByIdInteg(t *testing.T){
// Init("namespace", 1)
-// w := &rNibReaderInstance{}
// cell, err := w.GetCellById(entities.Cell_NR_CELL, "45d")
// if err != nil{
// fmt.Println(err)
// cell, err := w.GetCellById(entities.Cell_NR_CELL, "45d")
// if err != nil{
// fmt.Println(err)
//
//func TestGetListNbIdsInteg(t *testing.T) {
// Init("e2Manager", 1)
//
//func TestGetListNbIdsInteg(t *testing.T) {
// Init("e2Manager", 1)
-// w := &rNibReaderInstance{}
// ids, err := w.GetListNodebIds()
// if err != nil{
// fmt.Println(err)
// ids, err := w.GetListNodebIds()
// if err != nil{
// fmt.Println(err)
//
//func TestGetRanLoadInformationInteg(t *testing.T){
// Init("e2Manager", 1)
//
//func TestGetRanLoadInformationInteg(t *testing.T){
// Init("e2Manager", 1)
-// w := &rNibReaderInstance{}
// ranLoadInformation, err := w.GetRanLoadInformation("ran_integ")
// if err != nil{
// t.Errorf("#rNibReader_test.TestGetRanLoadInformationInteg - Failed to get RanLoadInformation entity. Error: %v", err)
// ranLoadInformation, err := w.GetRanLoadInformation("ran_integ")
// if err != nil{
// t.Errorf("#rNibReader_test.TestGetRanLoadInformationInteg - Failed to get RanLoadInformation entity. Error: %v", err)