Repository: jclouds
Updated Branches:
  refs/heads/2.0.x 8ab58f075 -> 5e9743a22


JCLOUDS-1327: Add tests for zero-length blobs


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/5e9743a2
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/5e9743a2
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/5e9743a2

Branch: refs/heads/2.0.x
Commit: 5e9743a226c7fbec4a0bdcbb169c8c612925cdb9
Parents: 8ab58f0
Author: Chaithanya Ganta <ga...@adobe.com>
Authored: Thu Jul 20 18:40:26 2017 +0530
Committer: Andrew Gaul <g...@apache.org>
Committed: Sun Aug 6 13:51:51 2017 -0700

----------------------------------------------------------------------
 .../internal/BaseBlobIntegrationTest.java            | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/5e9743a2/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobIntegrationTest.java
----------------------------------------------------------------------
diff --git 
a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobIntegrationTest.java
 
b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobIntegrationTest.java
index 2e13783..23defff 100644
--- 
a/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobIntegrationTest.java
+++ 
b/blobstore/src/test/java/org/jclouds/blobstore/integration/internal/BaseBlobIntegrationTest.java
@@ -624,6 +624,21 @@ public class BaseBlobIntegrationTest extends 
BaseBlobStoreIntegrationTest {
    }
 
    @Test(groups = { "integration", "live" })
+   public void testPutZeroLengthByteSource() throws Exception {
+      long length = 0;
+      Payload payload = new ByteSourcePayload(ByteSource.empty());
+      testPut(payload, null, payload, length, new PutOptions());
+   }
+
+   @Test(groups = { "integration", "live" })
+   public void testPutZeroLengthInputStream() throws Exception {
+      long length = 0;
+      ByteSource byteSource = ByteSource.empty();
+      Payload payload = new InputStreamPayload(byteSource.openStream());
+      testPut(payload, null, payload, length, new PutOptions());
+   }
+
+   @Test(groups = { "integration", "live" })
    public void testPutMultipartByteSource() throws Exception {
       long length = Math.max(getMinimumMultipartBlobSize(), 
MultipartUploadSlicingAlgorithm.DEFAULT_PART_SIZE + 1);
       BlobStore blobStore = view.getBlobStore();

Reply via email to