refactor: add delete options for Delete method in storage interface

This commit is contained in:
Abu Kashem
2024-09-19 10:31:08 -04:00
parent fbf1a0dc18
commit bc0ea34bc3
14 changed files with 45 additions and 39 deletions

View File

@@ -147,7 +147,7 @@ type FailDeletionStorage struct {
Called *bool
}
func (f FailDeletionStorage) Delete(_ context.Context, key string, _ runtime.Object, _ *apiserverstorage.Preconditions, _ apiserverstorage.ValidateObjectFunc, _ runtime.Object) error {
func (f FailDeletionStorage) Delete(_ context.Context, key string, _ runtime.Object, _ *apiserverstorage.Preconditions, _ apiserverstorage.ValidateObjectFunc, _ runtime.Object, _ apiserverstorage.DeleteOptions) error {
*f.Called = true
return apiserverstorage.NewKeyNotFoundError(key, 0)
}