VOL-2776 unit test for StartOmciTestAction
Change-Id: Ib0b560b2ae37fab428b3fc058f282b941c5e237f
diff --git a/rw_core/mocks/adapter.go b/rw_core/mocks/adapter.go
index 63474ef..6a8fb22 100644
--- a/rw_core/mocks/adapter.go
+++ b/rw_core/mocks/adapter.go
@@ -254,3 +254,8 @@
func (ta *Adapter) Child_device_lost(pDeviceID string, pPortNo uint32, onuID uint32) error { //nolint
return nil
}
+
+// Start_omci_test
+func (ta *Adapter) Start_omci_test(device *voltha.Device, request *voltha.OmciTestRequest) (*voltha.TestResponse, error) { //nolint
+ return nil, nil
+}
diff --git a/rw_core/mocks/adapter_olt.go b/rw_core/mocks/adapter_olt.go
index 4d58f00..5f67da7 100644
--- a/rw_core/mocks/adapter_olt.go
+++ b/rw_core/mocks/adapter_olt.go
@@ -18,6 +18,7 @@
import (
"context"
+ "errors"
"fmt"
"strings"
"sync"
@@ -310,6 +311,12 @@
return nil
}
+// TODO: REMOVE Start_omci_test begins an omci self-test
+func (oltA *OLTAdapter) Start_omci_test(device *voltha.Device, request *voltha.OmciTestRequest) (*ic.TestResponse, error) { // nolint
+ _ = device
+ return nil, errors.New("start-omci-test-not-implemented")
+}
+
// GetFlowCount returns the total number of flows presently under this adapter
func (oltA *OLTAdapter) GetFlowCount() int {
oltA.lock.Lock()
diff --git a/rw_core/mocks/adapter_onu.go b/rw_core/mocks/adapter_onu.go
index 92dff06..549e016 100644
--- a/rw_core/mocks/adapter_onu.go
+++ b/rw_core/mocks/adapter_onu.go
@@ -219,6 +219,12 @@
return nil
}
+// Start_omci_test begins an omci self-test
+func (onuA *ONUAdapter) Start_omci_test(device *voltha.Device, request *voltha.OmciTestRequest) (*ic.TestResponse, error) { // nolint
+ _ = device
+ return &ic.TestResponse{Result: ic.TestResponse_SUCCESS}, nil
+}
+
// GetFlowCount returns the total number of flows presently under this adapter
func (onuA *ONUAdapter) GetFlowCount() int {
onuA.lock.Lock()