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 78a35a2b613a0dd7c93175a8ad3b82cd2bd79bc0
Author: Andrea Cosentino <[email protected]>
AuthorDate: Mon Mar 1 09:06:24 2021 +0100

    CAMEL-16171 - Add uri-endpoint-override options to all AWS2 components - 
AWS2-EKS component
---
 .../aws2/eks/EKS2ComponentConfigurationTest.java         | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

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 162f3f4..007050c 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
@@ -67,4 +67,20 @@ public class EKS2ComponentConfigurationTest extends 
CamelTestSupport {
         assertEquals("localhost", endpoint.getConfiguration().getProxyHost());
         assertEquals(Integer.valueOf(9000), 
endpoint.getConfiguration().getProxyPort());
     }
+
+    @Test
+    public void createEndpointWithOverrideEndpoint() throws Exception {
+        EKS2Component component = context.getComponent("aws2-eks", 
EKS2Component.class);
+        component.getConfiguration().setAccessKey("XXX");
+        component.getConfiguration().setSecretKey("YYY");
+        component.getConfiguration().setRegion(Region.US_WEST_1.toString());
+        EKS2Endpoint endpoint
+                = (EKS2Endpoint) 
component.createEndpoint("aws2-eks://label?accessKey=xxxxxx&secretKey=yyyyy&region=US_EAST_1&overrideEndpoint=true&uriEndpointOverride=http://localhost:9090";);
+
+        assertEquals("xxxxxx", endpoint.getConfiguration().getAccessKey());
+        assertEquals("yyyyy", endpoint.getConfiguration().getSecretKey());
+        assertEquals("US_EAST_1", endpoint.getConfiguration().getRegion());
+        assertTrue(endpoint.getConfiguration().isOverrideEndpoint());
+        assertEquals("http://localhost:9090";, 
endpoint.getConfiguration().getUriEndpointOverride());
+    }
 }

Reply via email to