From 829f7f506490c7dc7d0aabf5719c063463789c06 Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Sun, 16 Jan 2011 14:23:13 -0800 Subject: [PATCH] Issue 440: added synaptic storage --- README.txt | 6 +- allblobstore/pom.xml | 5 + .../jclouds/atmos/AtmosAsyncClientTest.java | 14 +- core/src/main/resources/rest.properties | 7 +- providers/pom.xml | 1 + providers/synaptic-storage/pom.xml | 144 ++++++++++++++++++ .../SynapticStoragePropertiesBuilder.java | 52 +++++++ .../storage/ProvidersInPropertiesTest.java | 41 +++++ .../SynapticStorageAsyncClientTest.java | 35 +++++ .../SynapticStorageClientLiveTest.java | 33 ++++ ...ynapticStorageBlobIntegrationLiveTest.java | 40 +++++ .../SynapticStorageBlobLiveTest.java | 31 ++++ ...pticStorageBlobMapIntegrationLiveTest.java | 31 ++++ .../SynapticStorageBlobSignerLiveTest.java | 32 ++++ ...icStorageContainerIntegrationLiveTest.java | 31 ++++ .../SynapticStorageContainerLiveTest.java | 31 ++++ ...rageInputStreamMapIntegrationLiveTest.java | 31 ++++ ...pticStorageServiceIntegrationLiveTest.java | 31 ++++ .../SynapticStorageTestInitializer.java | 51 +++++++ 19 files changed, 636 insertions(+), 11 deletions(-) create mode 100644 providers/synaptic-storage/pom.xml create mode 100644 providers/synaptic-storage/src/main/java/org/jclouds/synaptic/storage/SynapticStoragePropertiesBuilder.java create mode 100644 providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/ProvidersInPropertiesTest.java create mode 100644 providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/SynapticStorageAsyncClientTest.java create mode 100644 providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/SynapticStorageClientLiveTest.java create mode 100644 providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/blobstore/integration/SynapticStorageBlobIntegrationLiveTest.java create mode 100644 providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/blobstore/integration/SynapticStorageBlobLiveTest.java create mode 100644 providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/blobstore/integration/SynapticStorageBlobMapIntegrationLiveTest.java create mode 100644 providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/blobstore/integration/SynapticStorageBlobSignerLiveTest.java create mode 100644 providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/blobstore/integration/SynapticStorageContainerIntegrationLiveTest.java create mode 100644 providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/blobstore/integration/SynapticStorageContainerLiveTest.java create mode 100644 providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/blobstore/integration/SynapticStorageInputStreamMapIntegrationLiveTest.java create mode 100644 providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/blobstore/integration/SynapticStorageServiceIntegrationLiveTest.java create mode 100644 providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/blobstore/integration/SynapticStorageTestInitializer.java diff --git a/README.txt b/README.txt index 677a732876..71de2fc9da 100644 --- a/README.txt +++ b/README.txt @@ -42,9 +42,9 @@ our compute api supports: aws-ec2, gogrid, cloudservers (generic), cloudservers- to all of these providers our blobstore api supports: aws-s3, cloudfiles (generic), cloudfiles-us, cloudfiles-uk, - azurestorage, atmos (generic), atmosonline, synaptic, peer1-storage, - s3 (generic), walrus(generic), googlestorage, scaleup-storage, - ecc-s3, swift (generic), transient (in-mem), + azurestorage, atmos (generic), atmosonline, synaptic-storage, + peer1-storage, s3 (generic), walrus(generic), googlestorage, + scaleup-storage, ecc-s3, swift (generic), transient (in-mem), filesystem (on-disk) * note * the pom dependency org.jclouds/jclouds-allblobstore gives you access to diff --git a/allblobstore/pom.xml b/allblobstore/pom.xml index dc8f50d78a..4228c866b7 100644 --- a/allblobstore/pom.xml +++ b/allblobstore/pom.xml @@ -44,6 +44,11 @@ googlestorage ${project.version} + + org.jclouds.provider + synaptic-storage + ${project.version} + org.jclouds.provider scaleup-storage diff --git a/apis/atmos/src/test/java/org/jclouds/atmos/AtmosAsyncClientTest.java b/apis/atmos/src/test/java/org/jclouds/atmos/AtmosAsyncClientTest.java index 5e793674e8..b174899924 100644 --- a/apis/atmos/src/test/java/org/jclouds/atmos/AtmosAsyncClientTest.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/AtmosAsyncClientTest.java @@ -72,8 +72,8 @@ public class AtmosAsyncClientTest extends RestClientTest { private BlobToObject blobToObject; public void testListDirectories() throws SecurityException, NoSuchMethodException, IOException { - Method method = AtmosAsyncClient.class.getMethod("listDirectories", Array - .newInstance(ListOptions.class, 0).getClass()); + Method method = AtmosAsyncClient.class.getMethod("listDirectories", Array.newInstance(ListOptions.class, 0) + .getClass()); HttpRequest request = processor.createRequest(method); assertRequestLineEquals(request, "GET https://accesspoint.atmosonline.com/rest/namespace HTTP/1.1"); @@ -104,8 +104,8 @@ public class AtmosAsyncClientTest extends RestClientTest { } public void testListDirectoriesOptions() throws SecurityException, NoSuchMethodException, IOException { - Method method = AtmosAsyncClient.class.getMethod("listDirectories", Array - .newInstance(ListOptions.class, 0).getClass()); + Method method = AtmosAsyncClient.class.getMethod("listDirectories", Array.newInstance(ListOptions.class, 0) + .getClass()); HttpRequest request = processor.createRequest(method, new ListOptions().limit(1).token("asda")); assertRequestLineEquals(request, "GET https://accesspoint.atmosonline.com/rest/namespace HTTP/1.1"); @@ -270,9 +270,13 @@ public class AtmosAsyncClientTest extends RestClientTest { } } + protected String provider = "atmos"; + @Override public RestContextSpec createContextSpec() { - return new RestContextFactory().createContextSpec("atmos", "identity", "credential", new Properties()); + Properties props = new Properties(); + props.setProperty(provider + ".endpoint", "https://accesspoint.atmosonline.com"); + return new RestContextFactory().createContextSpec(provider, "identity", "credential", props); } } diff --git a/core/src/main/resources/rest.properties b/core/src/main/resources/rest.properties index 38bb88d589..b9b6544afb 100644 --- a/core/src/main/resources/rest.properties +++ b/core/src/main/resources/rest.properties @@ -155,9 +155,10 @@ atmosonline.contextbuilder=org.jclouds.atmosonline.saas.AtmosStorageContextBuild atmosonline.endpoint=https://accesspoint.atmosonline.com atmosonline.apiversion=1.3.0 -synaptic.contextbuilder=org.jclouds.atmosonline.saas.AtmosStorageContextBuilder -synaptic.endpoint=https://storage.synaptic.att.com -synaptic.apiversion=1.3.0 +synaptic-storage.contextbuilder=org.jclouds.atmos.AtmosContextBuilder +synaptic-storage.propertiesbuilder=org.jclouds.synaptic.storage.SynapticStoragePropertiesBuilder +synaptic-storage.endpoint=https://storage.synaptic.att.com +synaptic-storage.apiversion=1.3.0 peer1-storage.contextbuilder=org.jclouds.atmosonline.saas.AtmosStorageContextBuilder peer1-storage.endpoint=https://storage.synaptic.att.com diff --git a/providers/pom.xml b/providers/pom.xml index 6cdf3b9fc0..c3d656ddf9 100644 --- a/providers/pom.xml +++ b/providers/pom.xml @@ -41,6 +41,7 @@ aws-ec2 googlestorage scaleup-storage + synaptic-storage ecc-s3 ecc-ec2 cloudservers-us diff --git a/providers/synaptic-storage/pom.xml b/providers/synaptic-storage/pom.xml new file mode 100644 index 0000000000..dbf9a2828a --- /dev/null +++ b/providers/synaptic-storage/pom.xml @@ -0,0 +1,144 @@ + + + + + 4.0.0 + + org.jclouds + jclouds-project + 1.0-SNAPSHOT + ../../project/pom.xml + + org.jclouds.provider + synaptic-storage + jclouds Synaptic Storage as a Service provider + Atmos implementation targeted to ATT Synaptic Storage as a Service + + + org.jclouds.synaptic.storage.blobstore.integration.SynapticStorageTestInitializer + https://storage.synaptic.att.com + 1.3.0 + FIXME_IDENTITY + FIXME_CREDENTIAL + + + + + org.jclouds.api + atmos + ${project.version} + jar + + + org.jclouds.api + atmos + ${project.version} + test-jar + test + + + org.jclouds + jclouds-core + ${project.version} + test-jar + test + + + org.jclouds + jclouds-blobstore + ${project.version} + test-jar + test + + + org.jclouds.driver + jclouds-log4j + ${project.version} + test + + + log4j + log4j + 1.2.16 + test + + + + + + live + + + + org.apache.maven.plugins + maven-surefire-plugin + + + integration + integration-test + + test + + + + + test.synaptic-storage.endpoint + ${test.synaptic-storage.endpoint} + + + test.synaptic-storage.apiversion + ${test.synaptic-storage.apiversion} + + + test.synaptic-storage.identity + ${test.synaptic-storage.identity} + + + test.synaptic-storage.credential + ${test.synaptic-storage.credential} + + + test.initializer + ${test.initializer} + + + jclouds.blobstore.httpstream.url + ${jclouds.blobstore.httpstream.url} + + + jclouds.blobstore.httpstream.md5 + ${jclouds.blobstore.httpstream.md5} + + + + + + + + + + + + + + diff --git a/providers/synaptic-storage/src/main/java/org/jclouds/synaptic/storage/SynapticStoragePropertiesBuilder.java b/providers/synaptic-storage/src/main/java/org/jclouds/synaptic/storage/SynapticStoragePropertiesBuilder.java new file mode 100644 index 0000000000..797676c0e8 --- /dev/null +++ b/providers/synaptic-storage/src/main/java/org/jclouds/synaptic/storage/SynapticStoragePropertiesBuilder.java @@ -0,0 +1,52 @@ +/** + * + * Copyright (C) 2010 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ + +package org.jclouds.synaptic.storage; + +import static org.jclouds.Constants.PROPERTY_API_VERSION; +import static org.jclouds.Constants.PROPERTY_ENDPOINT; + +import java.util.Properties; + +import org.jclouds.PropertiesBuilder; + +/** + * Builds properties used in Atmos Clients + * + * @author Adrian Cole + */ +public class SynapticStoragePropertiesBuilder extends PropertiesBuilder { + + @Override + protected Properties defaultProperties() { + Properties properties = super.defaultProperties(); + properties.setProperty(PROPERTY_ENDPOINT, "https://storage.synaptic.att.com"); + properties.setProperty(PROPERTY_API_VERSION, "1.3.0"); + return properties; + } + + public SynapticStoragePropertiesBuilder() { + super(); + } + + public SynapticStoragePropertiesBuilder(Properties properties) { + super(properties); + } + +} diff --git a/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/ProvidersInPropertiesTest.java b/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/ProvidersInPropertiesTest.java new file mode 100644 index 0000000000..0d4078c04f --- /dev/null +++ b/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/ProvidersInPropertiesTest.java @@ -0,0 +1,41 @@ +/** + * + * Copyright (C) 2010 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ + +package org.jclouds.synaptic.storage; + +import org.jclouds.rest.Providers; +import org.testng.annotations.Test; + +import com.google.common.collect.Iterables; + +/** + * + * @author Adrian Cole + * + */ +@Test(groups = "unit") +public class ProvidersInPropertiesTest { + + @Test + public void testSupportedProviders() { + Iterable providers = Providers.getSupportedProviders(); + assert Iterables.contains(providers, "synaptic-storage") : providers; + } + +} diff --git a/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/SynapticStorageAsyncClientTest.java b/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/SynapticStorageAsyncClientTest.java new file mode 100644 index 0000000000..37fbb47d61 --- /dev/null +++ b/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/SynapticStorageAsyncClientTest.java @@ -0,0 +1,35 @@ +/** + * + * Copyright (C) 2010 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ + +package org.jclouds.synaptic.storage; + +import org.testng.annotations.Test; + +/** + * @author Adrian Cole + */ +// NOTE:without testName, this will not call @Before* and fail w/NPE during surefire +@Test(groups = "unit", testName = "SynapticStorageAsyncClientTest") +public class SynapticStorageAsyncClientTest extends org.jclouds.atmos.AtmosAsyncClientTest { + + public SynapticStorageAsyncClientTest() { + this.provider = "synaptic-storage"; + } + +} diff --git a/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/SynapticStorageClientLiveTest.java b/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/SynapticStorageClientLiveTest.java new file mode 100644 index 0000000000..756ab7157d --- /dev/null +++ b/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/SynapticStorageClientLiveTest.java @@ -0,0 +1,33 @@ +/** + * + * Copyright (C) 2010 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ + +package org.jclouds.synaptic.storage; + +import org.jclouds.atmos.AtmosClientLiveTest; +import org.testng.annotations.Test; + +/** + * Tests behavior of {@code AtmosClient} + * + * @author Adrian Cole + */ +@Test(groups = "live", sequential = true, testName = "SynapticStorageClientLiveTest") +public class SynapticStorageClientLiveTest extends AtmosClientLiveTest { + +} diff --git a/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/blobstore/integration/SynapticStorageBlobIntegrationLiveTest.java b/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/blobstore/integration/SynapticStorageBlobIntegrationLiveTest.java new file mode 100644 index 0000000000..26ce7c38b9 --- /dev/null +++ b/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/blobstore/integration/SynapticStorageBlobIntegrationLiveTest.java @@ -0,0 +1,40 @@ +/** + * + * Copyright (C) 2010 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ + +package org.jclouds.synaptic.storage.blobstore.integration; + +import java.io.IOException; +import java.util.concurrent.ExecutionException; + +import org.jclouds.blobstore.integration.internal.BaseBlobIntegrationTest; +import org.testng.annotations.Test; + +/** + * @author Adrian Cole + */ +@Test(groups = "live", testName = "SynapticStorageBlobIntegrationLiveTest") +public class SynapticStorageBlobIntegrationLiveTest extends BaseBlobIntegrationTest { + + @Override + @Test(expectedExceptions = IllegalArgumentException.class) + public void testPutObjectStream() throws InterruptedException, IOException, ExecutionException { + super.testPutObjectStream(); + } + +} diff --git a/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/blobstore/integration/SynapticStorageBlobLiveTest.java b/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/blobstore/integration/SynapticStorageBlobLiveTest.java new file mode 100644 index 0000000000..babe091dbe --- /dev/null +++ b/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/blobstore/integration/SynapticStorageBlobLiveTest.java @@ -0,0 +1,31 @@ +/** + * + * Copyright (C) 2010 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ + +package org.jclouds.synaptic.storage.blobstore.integration; + +import org.jclouds.blobstore.integration.internal.BaseBlobLiveTest; +import org.testng.annotations.Test; + +/** + * @author Adrian Cole + */ +@Test(groups = "live", testName = "SynapticStorageBlobLiveTest") +public class SynapticStorageBlobLiveTest extends BaseBlobLiveTest { + +} diff --git a/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/blobstore/integration/SynapticStorageBlobMapIntegrationLiveTest.java b/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/blobstore/integration/SynapticStorageBlobMapIntegrationLiveTest.java new file mode 100644 index 0000000000..d739f8424c --- /dev/null +++ b/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/blobstore/integration/SynapticStorageBlobMapIntegrationLiveTest.java @@ -0,0 +1,31 @@ +/** + * + * Copyright (C) 2010 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ + +package org.jclouds.synaptic.storage.blobstore.integration; + +import org.jclouds.blobstore.integration.internal.BaseBlobMapIntegrationTest; +import org.testng.annotations.Test; + +/** + * @author Adrian Cole + */ +@Test(groups = "live", testName = "SynapticStorageBlobMapIntegrationLiveTest") +public class SynapticStorageBlobMapIntegrationLiveTest extends BaseBlobMapIntegrationTest { + +} diff --git a/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/blobstore/integration/SynapticStorageBlobSignerLiveTest.java b/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/blobstore/integration/SynapticStorageBlobSignerLiveTest.java new file mode 100644 index 0000000000..b9a3a82d29 --- /dev/null +++ b/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/blobstore/integration/SynapticStorageBlobSignerLiveTest.java @@ -0,0 +1,32 @@ +/** + * + * Copyright (C) 2010 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ + +package org.jclouds.synaptic.storage.blobstore.integration; + +import org.jclouds.blobstore.integration.internal.BaseBlobSignerLiveTest; +import org.testng.annotations.Test; + +/** + * + * @author Adrian Cole + */ +@Test(groups = "live", testName = "SynapticStorageBlobSignerLiveTest") +public class SynapticStorageBlobSignerLiveTest extends BaseBlobSignerLiveTest { + +} diff --git a/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/blobstore/integration/SynapticStorageContainerIntegrationLiveTest.java b/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/blobstore/integration/SynapticStorageContainerIntegrationLiveTest.java new file mode 100644 index 0000000000..0a73d26a6f --- /dev/null +++ b/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/blobstore/integration/SynapticStorageContainerIntegrationLiveTest.java @@ -0,0 +1,31 @@ +/** + * + * Copyright (C) 2010 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ + +package org.jclouds.synaptic.storage.blobstore.integration; + +import org.jclouds.blobstore.integration.internal.BaseContainerIntegrationTest; +import org.testng.annotations.Test; + +/** + * @author Adrian Cole + */ +@Test(groups = "live", testName = "SynapticStorageContainerIntegrationLiveTest") +public class SynapticStorageContainerIntegrationLiveTest extends BaseContainerIntegrationTest { + +} diff --git a/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/blobstore/integration/SynapticStorageContainerLiveTest.java b/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/blobstore/integration/SynapticStorageContainerLiveTest.java new file mode 100644 index 0000000000..80057b08d8 --- /dev/null +++ b/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/blobstore/integration/SynapticStorageContainerLiveTest.java @@ -0,0 +1,31 @@ +/** + * + * Copyright (C) 2010 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ + +package org.jclouds.synaptic.storage.blobstore.integration; + +import org.jclouds.blobstore.integration.internal.BaseContainerLiveTest; +import org.testng.annotations.Test; + +/** + * @author Adrian Cole + */ +@Test(groups = "live", testName = "SynapticStorageContainerLiveTest") +public class SynapticStorageContainerLiveTest extends BaseContainerLiveTest { + +} diff --git a/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/blobstore/integration/SynapticStorageInputStreamMapIntegrationLiveTest.java b/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/blobstore/integration/SynapticStorageInputStreamMapIntegrationLiveTest.java new file mode 100644 index 0000000000..68baf15764 --- /dev/null +++ b/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/blobstore/integration/SynapticStorageInputStreamMapIntegrationLiveTest.java @@ -0,0 +1,31 @@ +/** + * + * Copyright (C) 2010 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ + +package org.jclouds.synaptic.storage.blobstore.integration; + +import org.jclouds.blobstore.integration.internal.BaseInputStreamMapIntegrationTest; +import org.testng.annotations.Test; + +/** + * @author Adrian Cole + */ +@Test(groups = "live", testName = "SynapticStorageInputStreamMapIntegrationLiveTest") +public class SynapticStorageInputStreamMapIntegrationLiveTest extends BaseInputStreamMapIntegrationTest { + +} diff --git a/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/blobstore/integration/SynapticStorageServiceIntegrationLiveTest.java b/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/blobstore/integration/SynapticStorageServiceIntegrationLiveTest.java new file mode 100644 index 0000000000..bfbafedc68 --- /dev/null +++ b/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/blobstore/integration/SynapticStorageServiceIntegrationLiveTest.java @@ -0,0 +1,31 @@ +/** + * + * Copyright (C) 2010 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ + +package org.jclouds.synaptic.storage.blobstore.integration; + +import org.jclouds.blobstore.integration.internal.BaseServiceIntegrationTest; +import org.testng.annotations.Test; + +/** + * @author Adrian Cole + */ +@Test(groups = "live", testName = "SynapticStorageServiceIntegrationLiveTest") +public class SynapticStorageServiceIntegrationLiveTest extends BaseServiceIntegrationTest { + +} diff --git a/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/blobstore/integration/SynapticStorageTestInitializer.java b/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/blobstore/integration/SynapticStorageTestInitializer.java new file mode 100644 index 0000000000..ce0fb56c20 --- /dev/null +++ b/providers/synaptic-storage/src/test/java/org/jclouds/synaptic/storage/blobstore/integration/SynapticStorageTestInitializer.java @@ -0,0 +1,51 @@ +/** + * + * Copyright (C) 2010 Cloud Conscious, LLC. + * + * ==================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ==================================================================== + */ + +package org.jclouds.synaptic.storage.blobstore.integration; + +import java.io.IOException; + +import org.jclouds.blobstore.BlobStoreContext; +import org.jclouds.blobstore.BlobStoreContextFactory; +import org.jclouds.blobstore.integration.TransientBlobStoreTestInitializer; +import org.jclouds.blobstore.integration.internal.BaseBlobStoreIntegrationTest; +import org.jclouds.logging.log4j.config.Log4JLoggingModule; + +import com.google.common.collect.ImmutableSet; +import com.google.inject.Module; + +/** + * + * @author Adrian Cole + */ +public class SynapticStorageTestInitializer extends TransientBlobStoreTestInitializer { + + public SynapticStorageTestInitializer() { + provider = "synaptic-storage"; + BaseBlobStoreIntegrationTest.SANITY_CHECK_RETURNED_BUCKET_NAME = true; + } + + @Override + protected BlobStoreContext createLiveContext(Module configurationModule, String endpoint, String apiversion, + String app, String identity, String credential) throws IOException { + return new BlobStoreContextFactory().createContext(provider, ImmutableSet.of(configurationModule, + new Log4JLoggingModule()), setupProperties(endpoint, apiversion, identity, credential)); + } + +}