You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a fakeClient returned via fake.NewClientBuilder().Build() as a parameter to NewDryRunClient() I noticed that calls to the resulting dryRunClient's Delete() still deleted the resources instead of honoring the metav1.DryRunAll option.
A brief example of what my setup looks like:
fakeClient:=fake.NewClientBuilder().Build()
dryRunClient:=client.NewDryRunClient(fakeClient)
// This still deletes the objects passed indryRunClient.Delete(ctx, object)
This lead me to take a look at the source code for the fakeClient CRUD functions. I noticed that this snippet (or ones similar to it):
I am proposing that code is added to the fakeClientDelete() and DeleteAllOf() functions similar to the ones that exist in the above mentioned functions.
I am happy to take on the development work for this if the proposed solution is accepted.
The text was updated successfully, but these errors were encountered:
Problem
When using a
fakeClient
returned viafake.NewClientBuilder().Build()
as a parameter toNewDryRunClient()
I noticed that calls to the resultingdryRunClient
'sDelete()
still deleted the resources instead of honoring themetav1.DryRunAll
option.A brief example of what my setup looks like:
This lead me to take a look at the source code for the
fakeClient
CRUD functions. I noticed that this snippet (or ones similar to it):are present in the following functions:
Proposed Solution
I am proposing that code is added to the
fakeClient
Delete()
andDeleteAllOf()
functions similar to the ones that exist in the above mentioned functions.I am happy to take on the development work for this if the proposed solution is accepted.
The text was updated successfully, but these errors were encountered: