[camel] branch master updated: CAMEL-15153 some aws2 components were referencing the original aws components; also fixed a missing @Test

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[camel] branch master updated: CAMEL-15153 some aws2 components were referencing the original aws components; also fixed a missing @Test

acosentino
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 466ffd3  CAMEL-15153 some aws2 components were referencing the original aws components; also fixed a missing @Test
466ffd3 is described below

commit 466ffd3369000dc96b411fd08341a9b4c14ae65c
Author: Jon Chase <[hidden email]>
AuthorDate: Sat Jun 6 06:38:07 2020 -0400

    CAMEL-15153 some aws2 components were referencing the original aws components; also fixed a missing @Test
---
 .../component/aws2/ddb/integration/DdbComponentIntegrationTest.java   | 2 +-
 .../camel/component/aws2/ec2/EC2ComponentClientRegistryTest.java      | 4 ++--
 .../camel/component/aws2/ecs/ECS2ComponentClientRegistryTest.java     | 4 ++--
 .../camel/component/aws2/eks/EKS2ComponentClientRegistryTest.java     | 4 ++--
 components/camel-aws2-iam/src/main/docs/aws2-iam-component.adoc       | 4 ++--
 .../aws2/kinesis/KinesisConsumerClosedShardWithFailTest.java          | 1 +
 .../main/java/org/apache/camel/component/aws2/s3/AWS2S3Producer.java  | 2 +-
 .../camel/component/aws2/ses/SESComponentClientRegistryTest.java      | 4 ++--
 .../camel/component/aws2/ses/SesComponentConfigurationTest.java       | 2 +-
 docs/components/modules/ROOT/pages/aws2-iam-component.adoc            | 4 ++--
 10 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/components/camel-aws2-ddb/src/test/java/org/apache/camel/component/aws2/ddb/integration/DdbComponentIntegrationTest.java b/components/camel-aws2-ddb/src/test/java/org/apache/camel/component/aws2/ddb/integration/DdbComponentIntegrationTest.java
index d6a7f93..25a0120 100644
--- a/components/camel-aws2-ddb/src/test/java/org/apache/camel/component/aws2/ddb/integration/DdbComponentIntegrationTest.java
+++ b/components/camel-aws2-ddb/src/test/java/org/apache/camel/component/aws2/ddb/integration/DdbComponentIntegrationTest.java
@@ -137,7 +137,7 @@ public class DdbComponentIntegrationTest extends CamelTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("direct:start").to("aws-ddb://" + tableName + "?" + "region=" + region + "&accessKey=" + accessKey + "&secretKey=RAW(" + secretKey + ")");
+                from("direct:start").to("aws2-ddb://" + tableName + "?" + "region=" + region + "&accessKey=" + accessKey + "&secretKey=RAW(" + secretKey + ")");
             }
         };
     }
diff --git a/components/camel-aws2-ec2/src/test/java/org/apache/camel/component/aws2/ec2/EC2ComponentClientRegistryTest.java b/components/camel-aws2-ec2/src/test/java/org/apache/camel/component/aws2/ec2/EC2ComponentClientRegistryTest.java
index 147029c..80eb8e6 100644
--- a/components/camel-aws2-ec2/src/test/java/org/apache/camel/component/aws2/ec2/EC2ComponentClientRegistryTest.java
+++ b/components/camel-aws2-ec2/src/test/java/org/apache/camel/component/aws2/ec2/EC2ComponentClientRegistryTest.java
@@ -30,7 +30,7 @@ public class EC2ComponentClientRegistryTest extends CamelTestSupport {
         AmazonEC2ClientMock clientMock = new AmazonEC2ClientMock();
         context.getRegistry().bind("amazonEc2Client", clientMock);
         AWS2EC2Component component = context.getComponent("aws2-ec2", AWS2EC2Component.class);
-        AWS2EC2Endpoint endpoint = (AWS2EC2Endpoint)component.createEndpoint("aws-ec2://TestDomain");
+        AWS2EC2Endpoint endpoint = (AWS2EC2Endpoint)component.createEndpoint("aws2-ec2://TestDomain");
 
         assertNotNull(endpoint.getConfiguration().getAmazonEc2Client());
     }
@@ -40,7 +40,7 @@ public class EC2ComponentClientRegistryTest extends CamelTestSupport {
 
         AWS2EC2Component component = context.getComponent("aws2-ec2", AWS2EC2Component.class);
         assertThrows(IllegalArgumentException.class, () -> {
-            component.createEndpoint("aws-ec2://TestDomain");
+            component.createEndpoint("aws2-ec2://TestDomain");
         });
     }
 }
diff --git a/components/camel-aws2-ecs/src/test/java/org/apache/camel/component/aws2/ecs/ECS2ComponentClientRegistryTest.java b/components/camel-aws2-ecs/src/test/java/org/apache/camel/component/aws2/ecs/ECS2ComponentClientRegistryTest.java
index 6e0916f..370405a 100644
--- a/components/camel-aws2-ecs/src/test/java/org/apache/camel/component/aws2/ecs/ECS2ComponentClientRegistryTest.java
+++ b/components/camel-aws2-ecs/src/test/java/org/apache/camel/component/aws2/ecs/ECS2ComponentClientRegistryTest.java
@@ -30,7 +30,7 @@ public class ECS2ComponentClientRegistryTest extends CamelTestSupport {
         AmazonECSClientMock clientMock = new AmazonECSClientMock();
         context.getRegistry().bind("amazonEcsClient", clientMock);
         ECS2Component component = context.getComponent("aws2-ecs", ECS2Component.class);
-        ECS2Endpoint endpoint = (ECS2Endpoint)component.createEndpoint("aws-ecs://TestDomain");
+        ECS2Endpoint endpoint = (ECS2Endpoint)component.createEndpoint("aws2-ecs://TestDomain");
 
         assertNotNull(endpoint.getConfiguration().getEcsClient());
     }
@@ -40,7 +40,7 @@ public class ECS2ComponentClientRegistryTest extends CamelTestSupport {
 
         ECS2Component component = context.getComponent("aws2-ecs", ECS2Component.class);
         assertThrows(IllegalArgumentException.class, () -> {
-            component.createEndpoint("aws-ecs://TestDomain");
+            component.createEndpoint("aws2-ecs://TestDomain");
         });
     }
 }
diff --git a/components/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/EKS2ComponentClientRegistryTest.java b/components/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/EKS2ComponentClientRegistryTest.java
index 0992173..c061c23 100644
--- a/components/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/EKS2ComponentClientRegistryTest.java
+++ b/components/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/EKS2ComponentClientRegistryTest.java
@@ -30,7 +30,7 @@ public class EKS2ComponentClientRegistryTest extends CamelTestSupport {
         AmazonEKSClientMock clientMock = new AmazonEKSClientMock();
         context.getRegistry().bind("amazonEcsClient", clientMock);
         EKS2Component component = context.getComponent("aws2-eks", EKS2Component.class);
-        EKS2Endpoint endpoint = (EKS2Endpoint)component.createEndpoint("aws-eks://TestDomain");
+        EKS2Endpoint endpoint = (EKS2Endpoint)component.createEndpoint("aws2-eks://TestDomain");
 
         assertNotNull(endpoint.getConfiguration().getEksClient());
     }
@@ -40,7 +40,7 @@ public class EKS2ComponentClientRegistryTest extends CamelTestSupport {
 
         EKS2Component component = context.getComponent("aws2-eks", EKS2Component.class);
         assertThrows(IllegalArgumentException.class, () -> {
-            component.createEndpoint("aws-eks://TestDomain");
+            component.createEndpoint("aws2-eks://TestDomain");
         });
     }
 }
diff --git a/components/camel-aws2-iam/src/main/docs/aws2-iam-component.adoc b/components/camel-aws2-iam/src/main/docs/aws2-iam-component.adoc
index 1205164..7ed0001 100644
--- a/components/camel-aws2-iam/src/main/docs/aws2-iam-component.adoc
+++ b/components/camel-aws2-iam/src/main/docs/aws2-iam-component.adoc
@@ -160,7 +160,7 @@ Camel-AWS2 IAM component provides the following operation on the producer side:
 --------------------------------------------------------------------------------
 from("direct:createUser")
     .setHeader(IAMConstants.GROUP_NAME, constant("camel"))
-    .to("aws-iam://test?iamClient=#amazonIAMClient&operation=createUser")
+    .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=createUser")
 --------------------------------------------------------------------------------
 
 == Automatic detection of IamClient client in registry
@@ -177,7 +177,7 @@ In AWS IAM there are multiple operations you can submit, as an example for Creat
 ------------------------------------------------------------------------------------------------------
 from("direct:createUser")
      .setBody(CreateUserRequest.builder().userName("camel").build())
-    .to("aws-iam://test?iamClient=#amazonIAMClient&operation=createUser&pojoRequest=true")
+    .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=createUser&pojoRequest=true")
 ------------------------------------------------------------------------------------------------------
 
 In this way you'll pass the request directly without the need of passing headers and options specifically related to this operation.
diff --git a/components/camel-aws2-kinesis/src/test/java/org/apache/camel/component/aws2/kinesis/KinesisConsumerClosedShardWithFailTest.java b/components/camel-aws2-kinesis/src/test/java/org/apache/camel/component/aws2/kinesis/KinesisConsumerClosedShardWithFailTest.java
index 4a45a24..79d8a29 100644
--- a/components/camel-aws2-kinesis/src/test/java/org/apache/camel/component/aws2/kinesis/KinesisConsumerClosedShardWithFailTest.java
+++ b/components/camel-aws2-kinesis/src/test/java/org/apache/camel/component/aws2/kinesis/KinesisConsumerClosedShardWithFailTest.java
@@ -80,6 +80,7 @@ public class KinesisConsumerClosedShardWithFailTest {
         when(kinesisClient.getShardIterator(any(GetShardIteratorRequest.class))).thenReturn(GetShardIteratorResponse.builder().shardIterator("shardIterator").build());
     }
 
+    @Test
     public void itObtainsAShardIteratorOnFirstPoll() throws Exception {
         assertThrows(ReachedClosedStatusException.class, () -> {
             undertest.poll();
diff --git a/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Producer.java b/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Producer.java
index 019e09d..7f37aa2 100644
--- a/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Producer.java
+++ b/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Producer.java
@@ -129,7 +129,7 @@ public class AWS2S3Producer extends DefaultProducer {
         if (obj instanceof File) {
             filePayload = (File)obj;
         } else {
-            throw new IllegalArgumentException("aws-s3: MultiPart upload requires a File input.");
+            throw new IllegalArgumentException("aws2-s3: MultiPart upload requires a File input.");
         }
 
         Map<String, String> objectMetadata = determineMetadata(exchange);
diff --git a/components/camel-aws2-ses/src/test/java/org/apache/camel/component/aws2/ses/SESComponentClientRegistryTest.java b/components/camel-aws2-ses/src/test/java/org/apache/camel/component/aws2/ses/SESComponentClientRegistryTest.java
index e0f7fb2..caabaf9 100644
--- a/components/camel-aws2-ses/src/test/java/org/apache/camel/component/aws2/ses/SESComponentClientRegistryTest.java
+++ b/components/camel-aws2-ses/src/test/java/org/apache/camel/component/aws2/ses/SESComponentClientRegistryTest.java
@@ -30,7 +30,7 @@ public class SESComponentClientRegistryTest extends CamelTestSupport {
         AmazonSESClientMock awsSESClient = new AmazonSESClientMock();
         context.getRegistry().bind("awsSesClient", awsSESClient);
         Ses2Component component = new Ses2Component(context);
-        Ses2Endpoint endpoint = (Ses2Endpoint)component.createEndpoint("aws-ses://[hidden email]");
+        Ses2Endpoint endpoint = (Ses2Endpoint)component.createEndpoint("aws2-ses://[hidden email]");
 
         assertNotNull(endpoint.getConfiguration().getAmazonSESClient());
         component.close();
@@ -41,7 +41,7 @@ public class SESComponentClientRegistryTest extends CamelTestSupport {
 
         Ses2Component component = new Ses2Component(context);
         assertThrows(IllegalArgumentException.class, () -> {
-            component.createEndpoint("aws-ses://[hidden email]");
+            component.createEndpoint("aws2-ses://[hidden email]");
         });
         component.close();
     }
diff --git a/components/camel-aws2-ses/src/test/java/org/apache/camel/component/aws2/ses/SesComponentConfigurationTest.java b/components/camel-aws2-ses/src/test/java/org/apache/camel/component/aws2/ses/SesComponentConfigurationTest.java
index d7b9351..881b7d7 100644
--- a/components/camel-aws2-ses/src/test/java/org/apache/camel/component/aws2/ses/SesComponentConfigurationTest.java
+++ b/components/camel-aws2-ses/src/test/java/org/apache/camel/component/aws2/ses/SesComponentConfigurationTest.java
@@ -168,7 +168,7 @@ public class SesComponentConfigurationTest extends CamelTestSupport {
         component.getConfiguration().setAccessKey("XXX");
         component.getConfiguration().setSecretKey("YYY");
         component.getConfiguration().setRegion(Region.US_WEST_1.toString());
-        Ses2Endpoint endpoint = (Ses2Endpoint)component.createEndpoint("aws-ses://[hidden email]?accessKey=xxxxxx&secretKey=yyyyy&region=US_EAST_1");
+        Ses2Endpoint endpoint = (Ses2Endpoint)component.createEndpoint("aws2-ses://[hidden email]?accessKey=xxxxxx&secretKey=yyyyy&region=US_EAST_1");
 
         assertEquals("[hidden email]", endpoint.getConfiguration().getFrom());
         assertEquals("xxxxxx", endpoint.getConfiguration().getAccessKey());
diff --git a/docs/components/modules/ROOT/pages/aws2-iam-component.adoc b/docs/components/modules/ROOT/pages/aws2-iam-component.adoc
index 2bc314e..06c2f25 100644
--- a/docs/components/modules/ROOT/pages/aws2-iam-component.adoc
+++ b/docs/components/modules/ROOT/pages/aws2-iam-component.adoc
@@ -162,7 +162,7 @@ Camel-AWS2 IAM component provides the following operation on the producer side:
 --------------------------------------------------------------------------------
 from("direct:createUser")
     .setHeader(IAMConstants.GROUP_NAME, constant("camel"))
-    .to("aws-iam://test?iamClient=#amazonIAMClient&operation=createUser")
+    .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=createUser")
 --------------------------------------------------------------------------------
 
 == Automatic detection of IamClient client in registry
@@ -179,7 +179,7 @@ In AWS IAM there are multiple operations you can submit, as an example for Creat
 ------------------------------------------------------------------------------------------------------
 from("direct:createUser")
      .setBody(CreateUserRequest.builder().userName("camel").build())
-    .to("aws-iam://test?iamClient=#amazonIAMClient&operation=createUser&pojoRequest=true")
+    .to("aws2-iam://test?iamClient=#amazonIAMClient&operation=createUser&pojoRequest=true")
 ------------------------------------------------------------------------------------------------------
 
 In this way you'll pass the request directly without the need of passing headers and options specifically related to this operation.