Skip tests which B2 does not support

pull/210/head
Andrew Gaul 2017-04-08 15:49:21 -07:00
rodzic 76d7bd911d
commit d1cc178f77
1 zmienionych plików z 10 dodań i 0 usunięć

Wyświetl plik

@ -410,6 +410,9 @@ public final class AwsSdkTest {
@Test @Test
public void testMultipartCopy() throws Exception { public void testMultipartCopy() throws Exception {
// B2 requires two parts to issue an MPU
assumeTrue(!blobStoreType.equals("b2"));
String sourceBlobName = "testMultipartCopy-source"; String sourceBlobName = "testMultipartCopy-source";
String targetBlobName = "testMultipartCopy-target"; String targetBlobName = "testMultipartCopy-target";
@ -556,6 +559,9 @@ public final class AwsSdkTest {
@Test @Test
public void testSpecialCharacters() throws Exception { public void testSpecialCharacters() throws Exception {
String prefix = "special ~`!@#$%^&*()-_+=[]{}\\|;:'\"<>,./?"; String prefix = "special ~`!@#$%^&*()-_+=[]{}\\|;:'\"<>,./?";
if (blobStoreType.equals("b2")) {
prefix = prefix.replace("\\", "");
}
String blobName = prefix + "foo"; String blobName = prefix + "foo";
ObjectMetadata metadata = new ObjectMetadata(); ObjectMetadata metadata = new ObjectMetadata();
metadata.setContentLength(BYTE_SOURCE.size()); metadata.setContentLength(BYTE_SOURCE.size());
@ -1125,6 +1131,8 @@ public final class AwsSdkTest {
assertThat(listing.getObjectSummaries()).isEmpty(); assertThat(listing.getObjectSummaries()).isEmpty();
} }
// TODO: Fails since B2 returns the Cache-Control header on reads but does
// not accept it on writes.
@Test @Test
public void testCopyObjectPreserveMetadata() throws Exception { public void testCopyObjectPreserveMetadata() throws Exception {
String fromName = "from-name"; String fromName = "from-name";
@ -1279,6 +1287,8 @@ public final class AwsSdkTest {
@Test @Test
public void testConditionalGet() throws Exception { public void testConditionalGet() throws Exception {
assumeTrue(!blobStoreType.equals("b2"));
String blobName = "blob-name"; String blobName = "blob-name";
ObjectMetadata metadata = new ObjectMetadata(); ObjectMetadata metadata = new ObjectMetadata();
metadata.setContentLength(BYTE_SOURCE.size()); metadata.setContentLength(BYTE_SOURCE.size());