Repository: jclouds
Updated Branches:
  refs/heads/master d07c4a215 -> 9e73bbec1


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/d6038487
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/d6038487
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/d6038487

Branch: refs/heads/master
Commit: d6038487f7d4256f73dd089c9bc8d307fbae0aff
Parents: d07c4a2
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:07 2017 -0700

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


http://git-wip-us.apache.org/repos/asf/jclouds/blob/d6038487/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 5aee9f7..d3e6c1b 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
@@ -640,6 +640,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