diff --git a/source/ocproute.go b/source/ocproute.go index 1c0cf0354..8e5107a1f 100644 --- a/source/ocproute.go +++ b/source/ocproute.go @@ -108,6 +108,9 @@ func NewOcpRouteSource( }, nil } +func (ors *ocpRouteSource) AddEventHandler(handler func() error, stopChan <-chan struct{}, minInterval time.Duration) { +} + // Endpoints returns endpoint objects for each host-target combination that should be processed. // Retrieves all OpenShift Route resources on all namespaces func (ors *ocpRouteSource) Endpoints() ([]*endpoint.Endpoint, error) { diff --git a/source/store_test.go b/source/store_test.go index 5377fce4e..8980efd71 100644 --- a/source/store_test.go +++ b/source/store_test.go @@ -22,6 +22,7 @@ import ( cfclient "github.com/cloudfoundry-community/go-cfclient" contour "github.com/heptio/contour/apis/generated/clientset/versioned" + openshift "github.com/openshift/client-go/route/clientset/versioned" fakeContour "github.com/heptio/contour/apis/generated/clientset/versioned/fake" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/suite" @@ -36,6 +37,7 @@ type MockClientGenerator struct { istioClient istiomodel.ConfigStore cloudFoundryClient *cfclient.Client contourClient contour.Interface + openshiftClient openshift.Interface } func (m *MockClientGenerator) KubeClient() (kubernetes.Interface, error) { @@ -74,6 +76,15 @@ func (m *MockClientGenerator) ContourClient() (contour.Interface, error) { return nil, args.Error(1) } +func (m *MockClientGenerator) OpenShiftClient() (openshift.Interface, error) { + args := m.Called() + if args.Error(1) == nil { + m.openshiftClient = args.Get(0).(openshift.Interface) + return m.openshiftClient, nil + } + return nil, args.Error(1) +} + type ByNamesTestSuite struct { suite.Suite }