Run unknown parameter test

JCLOUDS-258 allows use of MPU with the generic S3 provider.
pull/41/head
Andrew Gaul 2015-02-09 21:50:41 -08:00
rodzic a6c5fabb0b
commit 4ebbce7956
2 zmienionych plików z 5 dodań i 4 usunięć

Wyświetl plik

@ -17,7 +17,7 @@
<module name="AvoidNestedBlocks"/> <module name="AvoidNestedBlocks"/>
<module name="AvoidStarImport"/> <module name="AvoidStarImport"/>
<module name="AvoidStaticImport"> <module name="AvoidStaticImport">
<property name="excludes" value="org.assertj.core.api.Assertions.assertThat"/> <property name="excludes" value="org.assertj.core.api.Assertions.assertThat,org.junit.Assert.fail"/>
</module> </module>
<module name="ClassTypeParameterName"/> <module name="ClassTypeParameterName"/>
<module name="CovariantEquals"/> <module name="CovariantEquals"/>

Wyświetl plik

@ -17,6 +17,7 @@
package org.gaul.s3proxy; package org.gaul.s3proxy;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import java.io.InputStream; import java.io.InputStream;
import java.net.URI; import java.net.URI;
@ -358,12 +359,11 @@ public final class S3ProxyTest {
.isEqualTo(HttpServletResponse.SC_OK); .isEqualTo(HttpServletResponse.SC_OK);
} }
// TODO: jclouds only supports MPU via aws-s3, not generic s3
@Ignore
@Test @Test
public void testUnknownParameter() throws Exception { public void testUnknownParameter() throws Exception {
String blobName = "blob"; String blobName = "blob";
ByteSource byteSource = ByteSource.wrap(new byte[1]); int minMultipartSize = 32 * 1024 * 1024 + 1;
ByteSource byteSource = ByteSource.wrap(new byte[minMultipartSize]);
Blob blob = s3BlobStore.blobBuilder(blobName) Blob blob = s3BlobStore.blobBuilder(blobName)
.payload(byteSource) .payload(byteSource)
.contentLength(byteSource.size()) .contentLength(byteSource.size())
@ -371,6 +371,7 @@ public final class S3ProxyTest {
PutOptions options = new PutOptions().multipart(true); PutOptions options = new PutOptions().multipart(true);
try { try {
s3BlobStore.putBlob(containerName, blob, options); s3BlobStore.putBlob(containerName, blob, options);
fail("Expected HttpResponseException");
} catch (RuntimeException re) { } catch (RuntimeException re) {
// TODO: why does jclouds wrap this in a // TODO: why does jclouds wrap this in a
// UncheckedExecutionException? // UncheckedExecutionException?