sdlInstanceMock.AssertExpectations(t)
}
-func TestUpdateNodebConnectivityStateSuccess(t *testing.T) {
+func TestUpdateNodebInfoOnConnectionStatusInversionSuccess(t *testing.T) {
inventoryName := "name"
plmnId := "02f829"
nbId := "4a952a0a"
nodebInfo := generateNodebInfo(inventoryName, entities.Node_ENB, plmnId, nbId)
data, err := proto.Marshal(nodebInfo)
if err != nil {
- t.Errorf("#rNibWriter_test.TestUpdateNodebConnectivityStateSuccess - Failed to marshal NodeB entity. Error: %v", err)
+ t.Errorf("#rNibWriter_test.TestUpdateNodebInfoOnConnectionStatusInversionSuccess - Failed to marshal NodeB entity. Error: %v", err)
}
var e error
var setExpected []interface{}
sdlInstanceMock.On("SetAndPublish", []string{channelName, eventName}, []interface{}{setExpected}).Return(e)
- rNibErr := w.UpdateNodebConnectivityState(nodebInfo, channelName, eventName)
+ rNibErr := w.UpdateNodebInfoOnConnectionStatusInversion(nodebInfo, channelName, eventName)
assert.Nil(t, rNibErr)
}
-func TestUpdateNodebConnectivityStateMissingInventoryNameFailure(t *testing.T) {
+func TestUpdateNodebInfoOnConnectionStatusInversionMissingInventoryNameFailure(t *testing.T) {
inventoryName := "name"
plmnId := "02f829"
nbId := "4a952a0a"
nodebInfo := &entities.NodebInfo{}
data, err := proto.Marshal(nodebInfo)
if err != nil {
- t.Errorf("#rNibWriter_test.TestUpdateNodebConnectivityStateMissingInventoryNameFailure - Failed to marshal NodeB entity. Error: %v", err)
+ t.Errorf("#rNibWriter_test.TestUpdateNodebInfoOnConnectionStatusInversionMissingInventoryNameFailure - Failed to marshal NodeB entity. Error: %v", err)
}
var e error
var setExpected []interface{}
sdlInstanceMock.On("SetAndPublish", []string{channelName, eventName}, []interface{}{setExpected}).Return(e)
- rNibErr := w.UpdateNodebConnectivityState(nodebInfo, channelName, eventName)
+ rNibErr := w.UpdateNodebInfoOnConnectionStatusInversion(nodebInfo, channelName, eventName)
assert.NotNil(t, rNibErr)
assert.IsType(t, &common.ValidationError{}, rNibErr)
}
-func TestUpdateNodebConnectivityStateMissingGlobalNbId(t *testing.T) {
+func TestUpdateNodebInfoOnConnectionStatusInversionMissingGlobalNbId(t *testing.T) {
inventoryName := "name"
channelName := "RAN_CONNECT_STATE_CHANGE"
eventName := inventoryName + "_" + "CONNECTED"
nodebInfo.RanName = inventoryName
data, err := proto.Marshal(nodebInfo)
if err != nil {
- t.Errorf("#rNibWriter_test.TestSaveEnb - Failed to marshal NodeB entity. Error: %v", err)
+ t.Errorf("#rNibWriter_test.TestUpdateNodebInfoOnConnectionStatusInversionMissingInventoryNameFailure - Failed to marshal NodeB entity. Error: %v", err)
}
var e error
var setExpected []interface{}
setExpected = append(setExpected, nodebNameKey, data)
sdlInstanceMock.On("SetAndPublish", []string{channelName, eventName}, []interface{}{setExpected}).Return(e)
- rNibErr := w.UpdateNodebConnectivityState(nodebInfo, channelName, eventName)
+ rNibErr := w.UpdateNodebInfoOnConnectionStatusInversion(nodebInfo, channelName, eventName)
assert.Nil(t, rNibErr)
}