Skip to content

Commit 8f2c20f

Browse files
align fake s3 with real s3
1 parent aa10b32 commit 8f2c20f

File tree

1 file changed

+1
-5
lines changed
  • plugins/repository-s3/src/test/java/org/elasticsearch/repositories/s3

1 file changed

+1
-5
lines changed

plugins/repository-s3/src/test/java/org/elasticsearch/repositories/s3/MockAmazonS3.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,7 @@ public DeleteObjectsResult deleteObjects(DeleteObjectsRequest request) throws Sd
158158

159159
final List<DeleteObjectsResult.DeletedObject> deletions = new ArrayList<>();
160160
for (DeleteObjectsRequest.KeyVersion key : request.getKeys()) {
161-
if (blobs.remove(key.getKey()) == null) {
162-
AmazonS3Exception exception = new AmazonS3Exception("[" + key + "] does not exist.");
163-
exception.setStatusCode(404);
164-
throw exception;
165-
} else {
161+
if (blobs.remove(key.getKey()) != null) {
166162
DeleteObjectsResult.DeletedObject deletion = new DeleteObjectsResult.DeletedObject();
167163
deletion.setKey(key.getKey());
168164
deletions.add(deletion);

0 commit comments

Comments
 (0)