Do not run marker tests when backend lacks support

pull/124/head
Andrew Gaul 2016-01-31 12:47:51 -08:00
rodzic 82d95a2746
commit bc68e2cb2e
2 zmienionych plików z 22 dodań i 0 usunięć

Wyświetl plik

@ -45,6 +45,7 @@ public final class JcloudsBucketsLiveTest extends BucketsLiveTest {
"0")); "0"));
private S3Proxy s3Proxy; private S3Proxy s3Proxy;
private BlobStoreContext context; private BlobStoreContext context;
private String blobStoreType;
@AfterClass @AfterClass
public void tearDown() throws Exception { public void tearDown() throws Exception {
@ -65,6 +66,7 @@ public final class JcloudsBucketsLiveTest extends BucketsLiveTest {
info = TestUtils.startS3Proxy(); info = TestUtils.startS3Proxy();
s3Proxy = info.getS3Proxy(); s3Proxy = info.getS3Proxy();
context = info.getBlobStore().getContext(); context = info.getBlobStore().getContext();
blobStoreType = context.unwrap().getProviderMetadata().getId();
} catch (Exception e) { } catch (Exception e) {
throw Throwables.propagate(e); throw Throwables.propagate(e);
} }
@ -115,4 +117,13 @@ public final class JcloudsBucketsLiveTest extends BucketsLiveTest {
throw new SkipException("bucket logging not supported", are); throw new SkipException("bucket logging not supported", are);
} }
} }
@Override
public void testListBucketMarker()
throws InterruptedException, ExecutionException, TimeoutException {
if (Quirks.OPAQUE_MARKERS.contains(blobStoreType)) {
throw new SkipException("opaque markers not supported");
}
super.testListBucketMarker();
}
} }

Wyświetl plik

@ -25,6 +25,7 @@ import com.google.common.util.concurrent.Uninterruptibles;
import org.jclouds.Constants; import org.jclouds.Constants;
import org.jclouds.blobstore.BlobStoreContext; import org.jclouds.blobstore.BlobStoreContext;
import org.jclouds.s3.blobstore.integration.S3ContainerIntegrationLiveTest; import org.jclouds.s3.blobstore.integration.S3ContainerIntegrationLiveTest;
import org.testng.SkipException;
import org.testng.annotations.AfterClass; import org.testng.annotations.AfterClass;
import org.testng.annotations.Test; import org.testng.annotations.Test;
@ -38,6 +39,7 @@ public final class JcloudsS3ContainerIntegrationLiveTest
"0")); "0"));
private S3Proxy s3Proxy; private S3Proxy s3Proxy;
private BlobStoreContext context; private BlobStoreContext context;
private String blobStoreType;
@AfterClass @AfterClass
public void tearDown() throws Exception { public void tearDown() throws Exception {
@ -58,6 +60,7 @@ public final class JcloudsS3ContainerIntegrationLiveTest
info = TestUtils.startS3Proxy(); info = TestUtils.startS3Proxy();
s3Proxy = info.getS3Proxy(); s3Proxy = info.getS3Proxy();
context = info.getBlobStore().getContext(); context = info.getBlobStore().getContext();
blobStoreType = context.unwrap().getProviderMetadata().getId();
} catch (Exception e) { } catch (Exception e) {
throw Throwables.propagate(e); throw Throwables.propagate(e);
} }
@ -70,4 +73,12 @@ public final class JcloudsS3ContainerIntegrationLiveTest
props.setProperty(Constants.PROPERTY_STRIP_EXPECT_HEADER, "true"); props.setProperty(Constants.PROPERTY_STRIP_EXPECT_HEADER, "true");
return props; return props;
} }
@Override
public void testListMarkerAfterLastKey() throws Exception {
if (Quirks.OPAQUE_MARKERS.contains(blobStoreType)) {
throw new SkipException("opaque markers not supported");
}
super.testListMarkerAfterLastKey();
}
} }