From 8c2cc935b8fb3a76bb0e68b5bda7472cd670fa21 Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Tue, 22 May 2012 11:25:46 -0600 Subject: [PATCH] removed awkward test, as this is now addressed at a higher level. Ex. malformed date string creation can be tested in jclouds-core --- .../integration/AWSS3ContainerLiveTest.java | 55 ------------------- 1 file changed, 55 deletions(-) diff --git a/providers/aws-s3/src/test/java/org/jclouds/aws/s3/blobstore/integration/AWSS3ContainerLiveTest.java b/providers/aws-s3/src/test/java/org/jclouds/aws/s3/blobstore/integration/AWSS3ContainerLiveTest.java index 78788e3ab2..f2cf6b9771 100644 --- a/providers/aws-s3/src/test/java/org/jclouds/aws/s3/blobstore/integration/AWSS3ContainerLiveTest.java +++ b/providers/aws-s3/src/test/java/org/jclouds/aws/s3/blobstore/integration/AWSS3ContainerLiveTest.java @@ -23,29 +23,18 @@ import static org.testng.Assert.assertEquals; import java.io.IOException; import java.net.MalformedURLException; -import java.text.ParseException; import java.util.Date; import java.util.NoSuchElementException; import java.util.Set; import org.jclouds.blobstore.BlobStore; -import org.jclouds.blobstore.BlobStoreContext; import org.jclouds.blobstore.domain.BlobMetadata; -import org.jclouds.date.DateCodec; -import org.jclouds.date.internal.SimpleDateCodecFactory; -import org.jclouds.date.internal.SimpleDateFormatDateService; import org.jclouds.domain.Location; -import org.jclouds.io.ContentMetadataCodec; -import org.jclouds.io.ContentMetadataCodec.DefaultContentMetadataCodec; import org.jclouds.s3.blobstore.integration.S3ContainerLiveTest; import org.jclouds.util.Strings2; import org.testng.annotations.Test; import com.google.common.base.Strings; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.Iterables; -import com.google.inject.AbstractModule; -import com.google.inject.Module; /** * @author Adrian Cole @@ -74,50 +63,6 @@ public class AWSS3ContainerLiveTest extends S3ContainerLiveTest { } } - @Test(groups = { "live" }) - public void testCreateBlobWithMalformedExpiry() throws InterruptedException, MalformedURLException, IOException { - // Create a blob that has a malformed Expires value; requires overriding the ContentMetadataCodec in Guice... - final ContentMetadataCodec contentMetadataCodec = new DefaultContentMetadataCodec(new SimpleDateCodecFactory(new SimpleDateFormatDateService())) { - @Override - protected DateCodec getExpiresDateCodec() { - return new DateCodec() { - @Override public Date toDate(String date) throws ParseException { - return new Date(); - } - @Override public String toString(Date date) { - return "wrong"; - } - }; - } - }; - - Module customModule = new AbstractModule() { - @Override - protected void configure() { - bind(ContentMetadataCodec.class).toInstance(contentMetadataCodec); - } - }; - - Iterable modules = Iterables.concat(setupModules(), ImmutableList.of(customModule)); - BlobStoreContext naughtyBlobStoreContext = createView(setupProperties(), modules); - BlobStore naughtyBlobStore = naughtyBlobStoreContext.getBlobStore(); - - final String containerName = getScratchContainerName(); - - try { - final String blobName = "hello"; - - naughtyBlobStore.createContainerInLocation(null, containerName, publicRead()); - naughtyBlobStore.putBlob(containerName, naughtyBlobStore.blobBuilder(blobName) - .payload(TEST_STRING).expires(new Date(System.currentTimeMillis() + 60*1000)).build()); - - assertConsistencyAwareBlobExpiryMetadata(containerName, blobName, new Date(0)); - - } finally { - recycleContainer(containerName); - } - } - @Test(groups = { "live" }) public void testCreateBlobInLocation() throws InterruptedException, MalformedURLException, IOException { String payload = "my data";