From 70008b093eddfe3173fc54e8a232c22daef9331f Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Thu, 8 Nov 2018 22:08:11 -0800 Subject: [PATCH] test deletes --- .../copier/src/main/java/com/seaweedfs/s3/PutObject.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/other/java/s3copy/copier/src/main/java/com/seaweedfs/s3/PutObject.java b/other/java/s3copy/copier/src/main/java/com/seaweedfs/s3/PutObject.java index 9af184d2b..9095cd739 100644 --- a/other/java/s3copy/copier/src/main/java/com/seaweedfs/s3/PutObject.java +++ b/other/java/s3copy/copier/src/main/java/com/seaweedfs/s3/PutObject.java @@ -61,9 +61,8 @@ public class PutObject { request.setMetadata(metadata); s3Client.putObject(request); + // test reads S3Object written = s3Client.getObject(bucketName, stringObjKeyName); - - try { String expected = IOUtils.toString(written.getObjectContent()); @@ -77,6 +76,9 @@ public class PutObject { IOUtils.closeQuietly(written, log); } + // test deletes + s3Client.deleteObject(bucketName, stringObjKeyName); + } catch (AmazonServiceException e) { // The call was transmitted successfully, but Amazon S3 couldn't process // it, so it returned an error response.