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/01 12:59:13 UTC
[camel] 04/06: CAMEL-16171 - Add uri-endpoint-override options to
all AWS2 components - AWS2-Eventbridge 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 072e4b0413514a2700a144eb0c829317b140b891
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Mar 1 13:48:27 2021 +0100
CAMEL-16171 - Add uri-endpoint-override options to all AWS2 components - AWS2-Eventbridge component
---
.../EventbridgeComponentConfigurationTest.java | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/eventbridge/EventbridgeComponentConfigurationTest.java b/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/eventbridge/EventbridgeComponentConfigurationTest.java
index 2722a82..2e570a5 100644
--- a/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/eventbridge/EventbridgeComponentConfigurationTest.java
+++ b/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/eventbridge/EventbridgeComponentConfigurationTest.java
@@ -22,6 +22,7 @@ import software.amazon.awssdk.core.Protocol;
import software.amazon.awssdk.regions.Region;
import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
public class EventbridgeComponentConfigurationTest extends CamelTestSupport {
@@ -69,4 +70,18 @@ public class EventbridgeComponentConfigurationTest extends CamelTestSupport {
assertEquals(Integer.valueOf(9000), endpoint.getConfiguration().getProxyPort());
}
+ @Test
+ public void createEndpointWithOverride() throws Exception {
+ EventbridgeComponent component = context.getComponent("aws2-eventbridge", EventbridgeComponent.class);
+ EventbridgeEndpoint endpoint
+ = (EventbridgeEndpoint) component
+ .createEndpoint("aws2-eventbridge://label?accessKey=xxxxxx&secretKey=yyyyy®ion=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());
+ }
+
}