This repository was archived by the owner on Mar 26, 2026. It is now read-only.
Add test case to validate if anonymous delete request returns 200#116
Merged
Conversation
krisis
suggested changes
Aug 16, 2017
krisis
left a comment
Member
There was a problem hiding this comment.
Overall changes look good to me. Couple of minor comments.
| ], | ||
| ]); | ||
| // Response code should be 200 | ||
| if (getstatuscode($result) != HTTP_OK) |
Member
There was a problem hiding this comment.
could we change the exception message to,
"deleteObjects returned incorrect response " . getStatusCode($result);
Contributor
Author
There was a problem hiding this comment.
yes that is better.
| ]); | ||
| if (getstatuscode($result) != HTTP_OK) | ||
| throw new Exception('deleteObjects api failed for ' . | ||
| $bucket); |
Member
There was a problem hiding this comment.
could we check if errors for each object is empty in the authenticated client test?
The test case validates the case where the requesting user does not have access to the bucket they are attempting to delete objects from and should receive an 'Access Denied' error for each object they are attempting to delete rather than the generic 403 AccessDenied error response.
05aa395 to
e9d1425
Compare
Contributor
Author
|
Done @krisis |
harshavardhana
approved these changes
Aug 16, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The test case validates the case where the requesting user does not have access to the bucket they are attempting to delete objects from and should receive a response 200 and an 'Access Denied' error for each object they are attempting to delete rather than the generic 403 AccessDenied error response.
AWS S3 reference doc: http://docs.aws.amazon.com/AmazonS3/latest/API/multiobjectdeleteapi.html#multiobjectdeleteapi-examples
Fixes: #115