You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2020/03/06 11:18:21 UTC

[camel] branch master updated (a5bb896 -> a8e271a)

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

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


    from a5bb896  Camel-Zookeeper-master: Fixed CS
     new 396ab76  Camel-AWS2-EKS: Migrated tests to Junit5
     new a8e271a  Camel-AWS2-EKS: Fixed CS

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 components/camel-aws2-eks/pom.xml                           |  7 +------
 .../component/aws2/eks/EKS2ComponentClientRegistryTest.java | 13 +++++++++----
 .../component/aws2/eks/EKS2ComponentConfigurationTest.java  |  6 ++++--
 .../aws2/eks/EKS2ComponentVerifierExtensionTest.java        | 11 ++++++-----
 .../camel/component/aws2/eks/EKS2ProducerSpringTest.java    |  6 ++++--
 .../apache/camel/component/aws2/eks/EKS2ProducerTest.java   |  6 ++++--
 6 files changed, 28 insertions(+), 21 deletions(-)


[camel] 01/02: Camel-AWS2-EKS: Migrated tests to Junit5

Posted by ac...@apache.org.
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

commit 396ab7650d77f93a497bc43e8ab96d3a7cdf6f56
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Mar 6 12:16:20 2020 +0100

    Camel-AWS2-EKS: Migrated tests to Junit5
---
 components/camel-aws2-eks/pom.xml                           |  7 +------
 .../component/aws2/eks/EKS2ComponentClientRegistryTest.java | 13 +++++++++----
 .../component/aws2/eks/EKS2ComponentConfigurationTest.java  |  6 ++++--
 .../aws2/eks/EKS2ComponentVerifierExtensionTest.java        | 11 ++++++-----
 .../camel/component/aws2/eks/EKS2ProducerSpringTest.java    |  6 ++++--
 .../apache/camel/component/aws2/eks/EKS2ProducerTest.java   |  6 ++++--
 6 files changed, 28 insertions(+), 21 deletions(-)

diff --git a/components/camel-aws2-eks/pom.xml b/components/camel-aws2-eks/pom.xml
index c805c4f..7821d60 100644
--- a/components/camel-aws2-eks/pom.xml
+++ b/components/camel-aws2-eks/pom.xml
@@ -53,13 +53,8 @@
 
         <!-- for testing -->
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
             <groupId>org.apache.camel</groupId>
-            <artifactId>camel-test-spring</artifactId>
+            <artifactId>camel-test-spring-junit5</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
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 2868986..b18305f 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
@@ -16,8 +16,11 @@
  */
 package org.apache.camel.component.aws2.eks;
 
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
 public class EKS2ComponentClientRegistryTest extends CamelTestSupport {
 
@@ -32,10 +35,12 @@ public class EKS2ComponentClientRegistryTest extends CamelTestSupport {
         assertNotNull(endpoint.getConfiguration().getEksClient());
     }
 
-    @Test(expected = IllegalArgumentException.class)
+    @Test
     public void createEndpointWithMinimalECSClientMisconfiguration() throws Exception {
 
         EKS2Component component = context.getComponent("aws2-eks", EKS2Component.class);
-        EKS2Endpoint endpoint = (EKS2Endpoint)component.createEndpoint("aws-eks://TestDomain");
+        assertThrows(IllegalArgumentException.class, () -> {
+            EKS2Endpoint endpoint = (EKS2Endpoint)component.createEndpoint("aws-eks://TestDomain");
+        });
     }
 }
diff --git a/components/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/EKS2ComponentConfigurationTest.java b/components/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/EKS2ComponentConfigurationTest.java
index 1312cca..b86b7cd 100644
--- a/components/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/EKS2ComponentConfigurationTest.java
+++ b/components/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/EKS2ComponentConfigurationTest.java
@@ -16,11 +16,13 @@
  */
 package org.apache.camel.component.aws2.eks;
 
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
 import software.amazon.awssdk.core.Protocol;
 import software.amazon.awssdk.regions.Region;
 
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
 public class EKS2ComponentConfigurationTest extends CamelTestSupport {
 
     @Test
diff --git a/components/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/EKS2ComponentVerifierExtensionTest.java b/components/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/EKS2ComponentVerifierExtensionTest.java
index 110ef20..9730931 100644
--- a/components/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/EKS2ComponentVerifierExtensionTest.java
+++ b/components/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/EKS2ComponentVerifierExtensionTest.java
@@ -21,9 +21,10 @@ import java.util.Map;
 
 import org.apache.camel.Component;
 import org.apache.camel.component.extension.ComponentVerifierExtension;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Assert;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class EKS2ComponentVerifierExtensionTest extends CamelTestSupport {
 
@@ -50,7 +51,7 @@ public class EKS2ComponentVerifierExtensionTest extends CamelTestSupport {
 
         ComponentVerifierExtension.Result result = verifier.verify(ComponentVerifierExtension.Scope.PARAMETERS, parameters);
 
-        Assert.assertEquals(ComponentVerifierExtension.Result.Status.OK, result.getStatus());
+        assertEquals(ComponentVerifierExtension.Result.Status.OK, result.getStatus());
     }
 
     @Test
@@ -67,7 +68,7 @@ public class EKS2ComponentVerifierExtensionTest extends CamelTestSupport {
 
         ComponentVerifierExtension.Result result = verifier.verify(ComponentVerifierExtension.Scope.CONNECTIVITY, parameters);
 
-        Assert.assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
+        assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
     }
 
 }
diff --git a/components/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/EKS2ProducerSpringTest.java b/components/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/EKS2ProducerSpringTest.java
index 3f20f4c..af6b33a 100644
--- a/components/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/EKS2ProducerSpringTest.java
+++ b/components/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/EKS2ProducerSpringTest.java
@@ -20,15 +20,17 @@ import org.apache.camel.EndpointInject;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.test.spring.CamelSpringTestSupport;
-import org.junit.Test;
+import org.apache.camel.test.spring.junit5.CamelSpringTestSupport;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
+import org.junit.jupiter.api.Test;
 import software.amazon.awssdk.services.eks.model.CreateClusterResponse;
 import software.amazon.awssdk.services.eks.model.DeleteClusterResponse;
 import software.amazon.awssdk.services.eks.model.DescribeClusterResponse;
 import software.amazon.awssdk.services.eks.model.ListClustersResponse;
 import software.amazon.awssdk.services.eks.model.VpcConfigRequest;
 
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
 public class EKS2ProducerSpringTest extends CamelSpringTestSupport {
 
     @EndpointInject("mock:result")
diff --git a/components/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/EKS2ProducerTest.java b/components/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/EKS2ProducerTest.java
index 87e11ee..73a55a6 100644
--- a/components/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/EKS2ProducerTest.java
+++ b/components/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/EKS2ProducerTest.java
@@ -22,14 +22,16 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
 import software.amazon.awssdk.services.eks.model.CreateClusterResponse;
 import software.amazon.awssdk.services.eks.model.DeleteClusterResponse;
 import software.amazon.awssdk.services.eks.model.DescribeClusterResponse;
 import software.amazon.awssdk.services.eks.model.ListClustersResponse;
 import software.amazon.awssdk.services.eks.model.VpcConfigRequest;
 
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
 public class EKS2ProducerTest extends CamelTestSupport {
 
     @BindToRegistry("amazonEksClient")


[camel] 02/02: Camel-AWS2-EKS: Fixed CS

Posted by ac...@apache.org.
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

commit a8e271ae8845cf9a9604d317e64433ea5ac4873e
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Mar 6 12:17:52 2020 +0100

    Camel-AWS2-EKS: Fixed CS
---
 .../org/apache/camel/component/aws2/eks/EKS2ProducerSpringTest.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/components/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/EKS2ProducerSpringTest.java b/components/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/EKS2ProducerSpringTest.java
index af6b33a..d224900 100644
--- a/components/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/EKS2ProducerSpringTest.java
+++ b/components/camel-aws2-eks/src/test/java/org/apache/camel/component/aws2/eks/EKS2ProducerSpringTest.java
@@ -21,8 +21,8 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.spring.junit5.CamelSpringTestSupport;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
 import org.junit.jupiter.api.Test;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
 import software.amazon.awssdk.services.eks.model.CreateClusterResponse;
 import software.amazon.awssdk.services.eks.model.DeleteClusterResponse;
 import software.amazon.awssdk.services.eks.model.DescribeClusterResponse;