Skip to content

Commit 7034ebd

Browse files
committed
Add Delete options to fakeclient interface
The fake client doesn't implement any of the options, so delete propagation won't actually work yet.
1 parent ed70024 commit 7034ebd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/client/fake/client.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func (c *fakeClient) Create(ctx context.Context, obj runtime.Object) error {
9999
return c.tracker.Create(gvr, obj, accessor.GetNamespace())
100100
}
101101

102-
func (c *fakeClient) Delete(ctx context.Context, obj runtime.Object) error {
102+
func (c *fakeClient) Delete(ctx context.Context, obj runtime.Object, opts ...client.DeleteOptionFunc) error {
103103
gvr, err := getGVRFromObject(obj)
104104
if err != nil {
105105
return err
@@ -108,6 +108,7 @@ func (c *fakeClient) Delete(ctx context.Context, obj runtime.Object) error {
108108
if err != nil {
109109
return err
110110
}
111+
//TODO: implement propagation
111112
return c.tracker.Delete(gvr, accessor.GetNamespace(), accessor.GetName())
112113
}
113114

0 commit comments

Comments
 (0)