You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2013/07/10 18:09:25 UTC

git commit: CAMEL-6536: Migrated tests to new api.

Updated Branches:
  refs/heads/master 6484f09d7 -> 1914ba9be


CAMEL-6536: Migrated tests to new api.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/1914ba9b
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/1914ba9b
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/1914ba9b

Branch: refs/heads/master
Commit: 1914ba9be296d63af9e4c6e6f1897b867f68c105
Parents: 6484f09
Author: Claus Ibsen <da...@apache.org>
Authored: Wed Jul 10 18:09:13 2013 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Wed Jul 10 18:09:13 2013 +0200

----------------------------------------------------------------------
 .../itest/osgi/jclouds/BlobStoreBlueprintRouteTest.java   | 10 +++-------
 .../camel/itest/osgi/jclouds/BlobStoreRouteTest.java      | 10 ++--------
 2 files changed, 5 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/1914ba9b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jclouds/BlobStoreBlueprintRouteTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jclouds/BlobStoreBlueprintRouteTest.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jclouds/BlobStoreBlueprintRouteTest.java
index 05108bb..eff0a54 100644
--- a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jclouds/BlobStoreBlueprintRouteTest.java
+++ b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jclouds/BlobStoreBlueprintRouteTest.java
@@ -22,16 +22,16 @@ import org.apache.camel.ProducerTemplate;
 import org.apache.camel.component.jclouds.JcloudsConstants;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.itest.osgi.blueprint.OSGiBlueprintTestSupport;
+import org.jclouds.ContextBuilder;
 import org.jclouds.blobstore.BlobStore;
 import org.jclouds.blobstore.BlobStoreContext;
-// import org.jclouds.blobstore.BlobStoreContextFactory;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.junit.Configuration;
 import org.ops4j.pax.exam.junit.JUnit4TestRunner;
 import org.osgi.framework.Constants;
+
 import static org.ops4j.pax.exam.CoreOptions.felix;
 import static org.ops4j.pax.exam.CoreOptions.provision;
 import static org.ops4j.pax.exam.CoreOptions.workingDirectory;
@@ -39,7 +39,6 @@ import static org.ops4j.pax.exam.OptionUtils.combine;
 import static org.ops4j.pax.swissbox.tinybundles.core.TinyBundles.newBundle;
 
 @RunWith(JUnit4TestRunner.class)
-@Ignore("See CAMEL-6536")
 public class BlobStoreBlueprintRouteTest extends OSGiBlueprintTestSupport {
 
     private static final String TEST_CONTAINER = "testContainer";
@@ -49,12 +48,9 @@ public class BlobStoreBlueprintRouteTest extends OSGiBlueprintTestSupport {
      */
     @Override
     protected void doPreSetup() throws Exception {
-/*        BlobStoreContextFactory contextFactory = new BlobStoreContextFactory();
-        BlobStoreContext blobStoreContext = contextFactory.createContext("transient", "identity", "credential");
-        BlobStore blobStore = blobStoreContext.getBlobStore();
+        BlobStore blobStore = ContextBuilder.newBuilder("transient").credentials("identity", "credential").buildView(BlobStoreContext.class).getBlobStore();
         blobStore.createContainerInLocation(null, TEST_CONTAINER);
         blobStore.clearContainer(TEST_CONTAINER);
-*/
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/camel/blob/1914ba9b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jclouds/BlobStoreRouteTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jclouds/BlobStoreRouteTest.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jclouds/BlobStoreRouteTest.java
index 3848dc9..5301539 100644
--- a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jclouds/BlobStoreRouteTest.java
+++ b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/jclouds/BlobStoreRouteTest.java
@@ -24,10 +24,9 @@ import org.apache.camel.component.jclouds.JcloudsConstants;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.itest.osgi.OSGiIntegrationTestSupport;
 import org.apache.camel.spring.SpringCamelContext;
+import org.jclouds.ContextBuilder;
 import org.jclouds.blobstore.BlobStore;
 import org.jclouds.blobstore.BlobStoreContext;
-// import org.jclouds.blobstore.BlobStoreContextFactory;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.Option;
@@ -39,7 +38,6 @@ import org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext;
 import static org.ops4j.pax.exam.OptionUtils.combine;
 
 @RunWith(JUnit4TestRunner.class)
-@Ignore("See CAMEL-6536")
 public class BlobStoreRouteTest extends OSGiIntegrationTestSupport {
 
     private static final String TEST_CONTAINER = "testContainer";
@@ -53,15 +51,11 @@ public class BlobStoreRouteTest extends OSGiIntegrationTestSupport {
      */
     @Override
     protected void doPreSetup() throws Exception {
-/*        BlobStoreContextFactory contextFactory = new BlobStoreContextFactory();
-        BlobStoreContext blobStoreContext = contextFactory.createContext("transient", "identity", "credential");
-        BlobStore blobStore = blobStoreContext.getBlobStore();
+        BlobStore blobStore = ContextBuilder.newBuilder("transient").credentials("identity", "credential").buildView(BlobStoreContext.class).getBlobStore();
         blobStore.createContainerInLocation(null, TEST_CONTAINER);
         blobStore.clearContainer(TEST_CONTAINER);
-*/
     }
 
-
     @Test
     public void testProducerAndConsumer() throws Exception {
         MockEndpoint mock = getMockEndpoint("mock:results");