camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acosent...@apache.org
Subject [4/5] camel git commit: CAMEL-8918 Camel-Jclouds: Add countBlobs and removeBlob operation to Blobstore component, add removeBlob test
Date Mon, 29 Jun 2015 12:28:58 GMT
CAMEL-8918 Camel-Jclouds: Add countBlobs and removeBlob operation to Blobstore component, add
removeBlob test


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

Branch: refs/heads/master
Commit: 3c33ae3e1e129858b50ea0f0100406a96fd91d65
Parents: 52e8074
Author: Andrea Cosentino <ancosen@gmail.com>
Authored: Mon Jun 29 13:56:03 2015 +0200
Committer: Andrea Cosentino <ancosen@gmail.com>
Committed: Mon Jun 29 14:24:54 2015 +0200

----------------------------------------------------------------------
 .../jclouds/JcloudsBlobStoreProducerTest.java         | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/3c33ae3e/components/camel-jclouds/src/test/java/org/apache/camel/component/jclouds/JcloudsBlobStoreProducerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-jclouds/src/test/java/org/apache/camel/component/jclouds/JcloudsBlobStoreProducerTest.java
b/components/camel-jclouds/src/test/java/org/apache/camel/component/jclouds/JcloudsBlobStoreProducerTest.java
index ab949a2..7af8ff3 100644
--- a/components/camel-jclouds/src/test/java/org/apache/camel/component/jclouds/JcloudsBlobStoreProducerTest.java
+++ b/components/camel-jclouds/src/test/java/org/apache/camel/component/jclouds/JcloudsBlobStoreProducerTest.java
@@ -79,6 +79,15 @@ public class JcloudsBlobStoreProducerTest extends CamelTestSupport {
         Object result = template.requestBodyAndHeader("direct:put-and-count", null, JcloudsConstants.OPERATION,
JcloudsConstants.COUNT_BLOBS, Long.class);
         assertEquals(new Long(1), result);
     }
+    
+    @Test
+    public void testBlobStorePutAndRemove() throws InterruptedException {
+        String message = "Some message";
+        template.sendBody("direct:put-and-remove", message);
+        template.requestBodyAndHeader("direct:put-and-remove", null, JcloudsConstants.OPERATION,
JcloudsConstants.REMOVE_BLOB);
+        Object result = template.requestBodyAndHeader("direct:put-and-remove", null, JcloudsConstants.OPERATION,
JcloudsConstants.COUNT_BLOBS, Long.class);
+        assertEquals(new Long(0), result);
+    }
 
     @Override
     protected RouteBuilder createRouteBuilder() throws Exception {
@@ -101,6 +110,11 @@ public class JcloudsBlobStoreProducerTest extends CamelTestSupport {
                         .setHeader(JcloudsConstants.BLOB_NAME, constant(TEST_BLOB_IN_DIR))
                         .setHeader(JcloudsConstants.CONTAINER_NAME, constant(TEST_CONTAINER))
                         .to("jclouds:blobstore:transient");
+                
+                from("direct:put-and-remove")
+                        .setHeader(JcloudsConstants.BLOB_NAME, constant(TEST_BLOB_IN_DIR))
+                        .setHeader(JcloudsConstants.CONTAINER_NAME, constant(TEST_CONTAINER))
+                        .to("jclouds:blobstore:transient");
             }
         };
     }


Mime
View raw message