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:05:46 UTC

[camel] 03/06: CAMEL-15836 - Camel-AWS2-ECS: enable autowire on the ECS client, fixed test

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 1c0306b20d8d7fda7338275002b8efe6903a71c4
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Nov 16 07:56:55 2020 +0100

    CAMEL-15836 - Camel-AWS2-ECS: enable autowire on the ECS client, fixed test
---
 .../aws2/ecs/ECS2ComponentClientRegistryTest.java         | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

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 ffcd407..b7f92b5 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
@@ -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 ECS2ComponentClientRegistryTest extends CamelTestSupport {
     }
 
     @Test
-    public void createEndpointWithAutoDiscoverClientFalse() throws Exception {
-
-        AmazonECSClientMock clientMock = new AmazonECSClientMock();
-        context.getRegistry().bind("amazonEcsClient", clientMock);
-        ECS2Component component = context.getComponent("aws2-ecs", ECS2Component.class);
-        ECS2Endpoint endpoint = (ECS2Endpoint) component
-                .createEndpoint("aws2-ecs://TestDomain?accessKey=xxx&secretKey=yyy&autoDiscoverClient=false");
-
-        assertNotSame(clientMock, endpoint.getConfiguration().getEcsClient());
-    }
-
-    @Test
-    public void createEndpointWithAutoDiscoverClientTrue() throws Exception {
+    public void createEndpointWithAutowire() throws Exception {
 
         AmazonECSClientMock clientMock = new AmazonECSClientMock();
         context.getRegistry().bind("amazonEcsClient", clientMock);