VOL-1888 Not enough info in ONU DGI to Identify the ONU.
Fixed to fetch the serial number from the list of ONUs
handled by the device handler from the onu-id and the
intf-id which is sent by the openolt agent in the dgi
indication.
Change-Id: I54342b9009d4d12c0efa3745d1f48567f183c245
diff --git a/adaptercore/openolt_eventmgr_test.go b/adaptercore/openolt_eventmgr_test.go
index 7de341f..dcfcef3 100644
--- a/adaptercore/openolt_eventmgr_test.go
+++ b/adaptercore/openolt_eventmgr_test.go
@@ -27,7 +27,13 @@
func mockEventMgr() *OpenOltEventMgr {
ep := &mocks.MockEventProxy{}
- return NewEventMgr(ep)
+ dh := &DeviceHandler{}
+ dh.onus = make(map[string]*OnuDevice)
+ dh.onus[dh.formOnuKey(1, 1)] = &OnuDevice{deviceID: "TEST_ONU",
+ deviceType: "ONU",
+ serialNumber: "TEST_ONU_123",
+ onuID: 1, intfID: 1}
+ return NewEventMgr(ep, dh)
}
func TestOpenOltEventMgr_ProcessEvents(t *testing.T) {
em := mockEventMgr()