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 2021/03/03 06:54:36 UTC

[camel] 04/06: CAMEL-16171 - Add uri-endpoint-override options to all AWS2 components - AWS2-SES component

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 c54d2bb31ad9ad79bf7fd4ebeb7068990ba620f4
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Mar 3 07:39:33 2021 +0100

    CAMEL-16171 - Add uri-endpoint-override options to all AWS2 components - AWS2-SES component
---
 .../aws2/ses/SesComponentConfigurationTest.java        | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

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 c510dde..5a49b73 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
@@ -208,4 +208,22 @@ public class SesComponentConfigurationTest extends CamelTestSupport {
         Ses2Component component = context.getComponent("aws2-ses", Ses2Component.class);
         component.createEndpoint("aws2-ses://from@example.com?amazonSESClient=#amazonSESClient");
     }
+
+    @Test
+    public void createEndpointWithOverride() throws Exception {
+        Ses2Component component = context.getComponent("aws2-ses", Ses2Component.class);
+        Ses2Endpoint endpoint
+                = (Ses2Endpoint) component.createEndpoint("aws2-ses://from@example.com?accessKey=xxx&secretKey=yyy&overrideEndpoint=true&uriEndpointOverride=http://localhost:9090");
+
+        assertEquals("from@example.com", endpoint.getConfiguration().getFrom());
+        assertEquals("xxx", endpoint.getConfiguration().getAccessKey());
+        assertEquals("yyy", endpoint.getConfiguration().getSecretKey());
+        assertNull(endpoint.getConfiguration().getAmazonSESClient());
+        assertNull(endpoint.getConfiguration().getTo());
+        assertNull(endpoint.getConfiguration().getSubject());
+        assertNull(endpoint.getConfiguration().getReturnPath());
+        assertNull(endpoint.getConfiguration().getReplyToAddresses());
+        assertTrue(endpoint.getConfiguration().isOverrideEndpoint());
+        assertEquals("http://localhost:9090", endpoint.getConfiguration().getUriEndpointOverride());
+    }
 }