Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pkg/adapter/apiserver/delegate.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,8 @@ func (a *resourceDelegate) Replace([]interface{}, string) error {
func (a *resourceDelegate) Resync() error {
return nil
}

// Implements cache.Store
func (a *resourceDelegate) Bookmark(obj interface{}) error {
return nil
}
1 change: 1 addition & 0 deletions pkg/adapter/apiserver/delegate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ func TestResourceStub(t *testing.T) {
d.GetByKey("")
d.Replace(nil, "")
d.Resync()
d.Bookmark(nil)
}

func TestFilterFails(t *testing.T) {
Expand Down
5 changes: 5 additions & 0 deletions pkg/adapter/apiserver/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,8 @@ func (c *controllerFilter) Replace([]interface{}, string) error {
func (c *controllerFilter) Resync() error {
return nil
}

// Implements cache.Store
func (c *controllerFilter) Bookmark(obj interface{}) error {
return nil
}
12 changes: 12 additions & 0 deletions pkg/adapter/apiserver/filter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,18 @@ func TestControllerDeleteEventWithGoodControllerNoAPIVersion(t *testing.T) {
validateSent(t, tc, sources.ApiServerSourceDeleteRefEventType)
}

func TestControllerStub(t *testing.T) {
c, _ := makeController("v1", "Pod")

c.List()
c.ListKeys()
c.Get(nil)
c.GetByKey("")
c.Replace(nil, "")
c.Resync()
c.Bookmark(nil)
}

func makeController(apiVersion, kind string) (*controllerFilter, *adaptertest.TestCloudEventsClient) {
delegate, tc := makeRefAndTestingClient()
return &controllerFilter{
Expand Down
1 change: 1 addition & 0 deletions pkg/adapter/apiserver/ref_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,5 @@ func TestRefStub(t *testing.T) {
d.GetByKey("")
d.Replace(nil, "")
d.Resync()
d.Bookmark(nil)
}
Loading