Bucket.Delete doesn't return an error
Closed this issue · 2 comments
Hi, First of all, congratulations on great work on these Google Emulators.
I am trying to use a storage emulator to test one golang application that uses GCS. But when I try test error on delete bucket that doesn't exist bucket. The emulator doesn't return any error to inform that Bucket doesn't exist.
The real GCS API returns one error when I try to delete on the bucket that doesn't exist.
Is this behavior expected by this emulator?
I suppose there's an interesting philosophical question around that. Typically I tend to try to make API calls idempotent-- if you do the same thing twice you should see the same result. This allows things like retries where there's a communication failure to work seamlessly (perhaps the modification you wrote succeeded, but you never got the success message back?). So often on things like delete operations I'll have "no such entity" be treated like a success case. You wanted the thing gone, and in fact it's gone.
That said, there's value to following Google's API on this. What error do you get when you try to delete a non-existent bucket in the real API? A test case would be awesome if you have one already.
@LeoCBS I believe I fixed you issue with my last merge. Could you please double check it?
🇧🇷