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/11/16 07:35:00 UTC

[camel] 03/05: CAMEL-15836 - Camel-AWS2-EKS: enable autowire on the EKS client, fixed tests

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 5224324ea9d12154cd6a379e506706db1fd9457a
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Nov 16 08:21:51 2020 +0100

    CAMEL-15836 - Camel-AWS2-EKS: enable autowire on the EKS client, fixed tests
---
 .../aws2/eks/EKS2ComponentClientRegistryTest.java         | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

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 f119255..4a6b0a4 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
@@ -20,7 +20,6 @@ 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.assertNotSame;
 import static org.junit.jupiter.api.Assertions.assertSame;
 import static org.junit.jupiter.api.Assertions.assertThrows;
 
@@ -47,19 +46,7 @@ public class EKS2ComponentClientRegistryTest extends CamelTestSupport {
     }
 
     @Test
-    public void createEndpointWithAutoDiscoverClientFalse() throws Exception {
-
-        AmazonEKSClientMock clientMock = new AmazonEKSClientMock();
-        context.getRegistry().bind("amazonEcsClient", clientMock);
-        EKS2Component component = context.getComponent("aws2-eks", EKS2Component.class);
-        EKS2Endpoint endpoint = (EKS2Endpoint) component
-                .createEndpoint("aws2-eks://TestDomain?accessKey=xxx&secretKey=yyy&autoDiscoverClient=false");
-
-        assertNotSame(clientMock, endpoint.getConfiguration().getEksClient());
-    }
-
-    @Test
-    public void createEndpointWithAutoDiscoverClientTrue() throws Exception {
+    public void createEndpointWithAutowired() throws Exception {
 
         AmazonEKSClientMock clientMock = new AmazonEKSClientMock();
         context.getRegistry().bind("amazonEcsClient", clientMock);