[VOL-4442] grpc streaming connection monitoring
Change-Id: I435a03fdc0ac2b549dc4512220148cb19c16db19
diff --git a/pkg/mocks/mockCoreClient.go b/pkg/mocks/mockCoreClient.go
index 28a4324..1825f5e 100644
--- a/pkg/mocks/mockCoreClient.go
+++ b/pkg/mocks/mockCoreClient.go
@@ -27,14 +27,14 @@
vgrpc "github.com/opencord/voltha-lib-go/v7/pkg/grpc"
"github.com/opencord/voltha-protos/v5/go/common"
ca "github.com/opencord/voltha-protos/v5/go/core_adapter"
- "github.com/opencord/voltha-protos/v5/go/health"
+ "github.com/opencord/voltha-protos/v5/go/core_service"
"github.com/opencord/voltha-protos/v5/go/voltha"
"google.golang.org/grpc"
)
// NewMockCoreClient creates a new mock core client for a given core service
func NewMockCoreClient(coreService *MockCoreService) *vgrpc.Client {
- cc, _ := vgrpc.NewClient("mock-local-endpoint", "mock-remote-endpoint", nil)
+ cc, _ := vgrpc.NewClient("mock-core-endpoint", "mock-server-endpoint", "core_service.CoreService", nil)
cc.SetService(coreService)
return cc
}
@@ -47,11 +47,6 @@
DevicePorts map[string][]*voltha.Port
}
-// GetHealthStatus implements mock GetHealthStatus
-func (mcs MockCoreService) GetHealthStatus(ctx context.Context, in *common.Connection, opts ...grpc.CallOption) (*health.HealthStatus, error) {
- return &health.HealthStatus{State: health.HealthStatus_HEALTHY}, nil
-}
-
// RegisterAdapter implements mock RegisterAdapter
func (mcs MockCoreService) RegisterAdapter(ctx context.Context, in *ca.AdapterRegistration, opts ...grpc.CallOption) (*empty.Empty, error) {
if ctx == nil || in.Adapter == nil || in.DTypes == nil {
@@ -232,6 +227,11 @@
return &empty.Empty{}, nil
}
+// GetHealthStatus implements mock GetHealthStatus
+func (mcs MockCoreService) GetHealthStatus(ctx context.Context, opts ...grpc.CallOption) (core_service.CoreService_GetHealthStatusClient, error) {
+ return nil, nil
+}
+
// Additional API found in the Core - unused?
// ReconcileChildDevices implements mock ReconcileChildDevices