Skip to content

Commit

Permalink
Add Delete options to fakeclient interface
Browse files Browse the repository at this point in the history
The fake client doesn't implement any of the options, so delete
propagation won't actually work yet.
  • Loading branch information
grantr committed Aug 24, 2018
1 parent ed70024 commit 7034ebd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/client/fake/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (c *fakeClient) Create(ctx context.Context, obj runtime.Object) error {
return c.tracker.Create(gvr, obj, accessor.GetNamespace())
}

func (c *fakeClient) Delete(ctx context.Context, obj runtime.Object) error {
func (c *fakeClient) Delete(ctx context.Context, obj runtime.Object, opts ...client.DeleteOptionFunc) error {
gvr, err := getGVRFromObject(obj)
if err != nil {
return err
Expand All @@ -108,6 +108,7 @@ func (c *fakeClient) Delete(ctx context.Context, obj runtime.Object) error {
if err != nil {
return err
}
//TODO: implement propagation
return c.tracker.Delete(gvr, accessor.GetNamespace(), accessor.GetName())
}

Expand Down

0 comments on commit 7034ebd

Please sign in to comment.