mirror of https://github.com/apache/jclouds.git
JCLOUDS-1327: Add tests for zero-length blobs
This commit is contained in:
parent
d07c4a215e
commit
d6038487f7
|
@ -639,6 +639,21 @@ public class BaseBlobIntegrationTest extends BaseBlobStoreIntegrationTest {
|
||||||
testPut(payload, null, new ByteSourcePayload(byteSource), length, new PutOptions());
|
testPut(payload, null, new ByteSourcePayload(byteSource), length, new PutOptions());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@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" })
|
@Test(groups = { "integration", "live" })
|
||||||
public void testPutMultipartByteSource() throws Exception {
|
public void testPutMultipartByteSource() throws Exception {
|
||||||
long length = Math.max(getMinimumMultipartBlobSize(), MultipartUploadSlicingAlgorithm.DEFAULT_PART_SIZE + 1);
|
long length = Math.max(getMinimumMultipartBlobSize(), MultipartUploadSlicingAlgorithm.DEFAULT_PART_SIZE + 1);
|
||||||
|
|
Loading…
Reference in New Issue