This is an automated email from the ASF dual-hosted git repository.
ppalaga pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/master by this push:
new dfc3300 Test AWS 2 SES
dfc3300 is described below
commit dfc3300b0c2ad3a083c06835fec7b4d2d5acb8e7
Author: Peter Palaga <[email protected]>
AuthorDate: Thu Feb 25 10:21:05 2021 +0100
Test AWS 2 SES
---
integration-tests-aws2/{aws2-s3 => }/README.adoc | 19 +-
integration-tests-aws2/aws2-ses/pom.xml | 146 +++++++++++++++
.../component/aws2/ses/it/Aws2SesResource.java | 68 +++++++
.../src/main/resources/application.properties | 22 +++
.../quarkus/component/aws2/ses/it/Aws2SesIT.java | 28 +++
.../quarkus/component/aws2/ses/it/Aws2SesTest.java | 196 +++++++++++++++++++++
.../aws2/ses/it/Aws2SesTestEnvCustomizer.java | 34 ++++
...quarkus.test.support.aws2.Aws2TestEnvCustomizer | 1 +
integration-tests-aws2/pom.xml | 1 +
.../test/support/aws2/Aws2TestEnvContext.java | 15 +-
integration-tests/aws2-grouped/README.adoc | 2 +-
integration-tests/aws2-grouped/pom.xml | 22 +++
pom.xml | 1 +
poms/bom-test/pom.xml | 5 +
14 files changed, 547 insertions(+), 13 deletions(-)
diff --git a/integration-tests-aws2/aws2-s3/README.adoc
b/integration-tests-aws2/README.adoc
similarity index 52%
rename from integration-tests-aws2/aws2-s3/README.adoc
rename to integration-tests-aws2/README.adoc
index c583472..b3d0124 100644
--- a/integration-tests-aws2/aws2-s3/README.adoc
+++ b/integration-tests-aws2/README.adoc
@@ -1,6 +1,14 @@
-== AWS 2 S3 integration tests
+== AWS 2 isolated integration tests
-By default, the tests are run against a
https://github.com/localstack/localstack[Localstack] container.
+=== Localstack
+
+The tests not impacted by https://github.com/apache/camel-quarkus/issues/2216
are run against Localstack by default.
+
+The tests impacted by https://github.com/apache/camel-quarkus/issues/2216 are
ignored by default.
+
+The SES test is ignored unless `MAILSLURP_API_KEY` variable is set.
+
+=== Real AWS API
To run the tests against the real AWS API, you need to
@@ -9,13 +17,18 @@ To run the tests against the real AWS API, you need to
(access key ID and secret access key)
* Export our preferred
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-available-regions[AWS
region].
+* For SES, you additionally need a https://app.mailslurp.com/[MailSlurp
account] and API key
+ (the free dev account should be enough)
[source,shell]
----
export AWS_ACCESS_KEY=<your-access-key-id>
export AWS_SECRET_KEY=<your-secret-access-key>
export AWS_REGION=eu-central-1
+# for SES
+export MAILSLURP_API_KEY=<your-mailslurp-api-key>
----
You may want to `export CAMEL_QUARKUS_START_MOCK_BACKEND=false` to force
testing against
-the real AWS API.
\ No newline at end of file
+the real AWS API.
+
diff --git a/integration-tests-aws2/aws2-ses/pom.xml
b/integration-tests-aws2/aws2-ses/pom.xml
new file mode 100644
index 0000000..48b09b5
--- /dev/null
+++ b/integration-tests-aws2/aws2-ses/pom.xml
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-integration-tests-aws2</artifactId>
+ <version>1.8.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-integration-test-aws2-ses</artifactId>
+ <name>Camel Quarkus :: Integration Tests :: AWS 2 Simple Email Service
(SES)</name>
+ <description>Integration tests for Camel Quarkus AWS 2 Simple Email
Service (SES) extension</description>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-bom-test</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-main</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-aws2-ses</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-resteasy</artifactId>
+ </dependency>
+
+ <!-- test dependencies -->
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-junit5</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>io.rest-assured</groupId>
+ <artifactId>rest-assured</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+
<artifactId>camel-quarkus-integration-tests-support-aws2</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.awaitility</groupId>
+ <artifactId>awaitility</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.seleniumhq.selenium</groupId>
+ <artifactId>htmlunit-driver</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- The following dependencies guarantee that this module is built
after them. You can update them by running `mvn process-resources -Pformat -N`
from the source tree root directory -->
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-aws2-ses-deployment</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-main-deployment</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+
+ <profiles>
+ <profile>
+ <id>native</id>
+ <activation>
+ <property>
+ <name>native</name>
+ </property>
+ </activation>
+ <properties>
+ <quarkus.package.type>native</quarkus.package.type>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>integration-test</goal>
+ <goal>verify</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+</project>
diff --git
a/integration-tests-aws2/aws2-ses/src/main/java/org/apache/camel/quarkus/component/aws2/ses/it/Aws2SesResource.java
b/integration-tests-aws2/aws2-ses/src/main/java/org/apache/camel/quarkus/component/aws2/ses/it/Aws2SesResource.java
new file mode 100644
index 0000000..63e640e
--- /dev/null
+++
b/integration-tests-aws2/aws2-ses/src/main/java/org/apache/camel/quarkus/component/aws2/ses/it/Aws2SesResource.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.aws2.ses.it;
+
+import java.net.URI;
+import java.util.Collections;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.HeaderParam;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.apache.camel.FluentProducerTemplate;
+import org.apache.camel.component.aws2.ses.Ses2Constants;
+import org.jboss.logging.Logger;
+
+@Path("/aws2-ses")
+@ApplicationScoped
+public class Aws2SesResource {
+ private static final Logger LOG = Logger.getLogger(Aws2SesResource.class);
+
+ @Inject
+ FluentProducerTemplate producerTemplate;
+
+ @Path("/send")
+ @POST
+ @Consumes(MediaType.TEXT_PLAIN)
+ @Produces(MediaType.TEXT_PLAIN)
+ public Response post(
+ String message,
+ @HeaderParam("x-from") String from,
+ @HeaderParam("x-to") String to,
+ @HeaderParam("x-subject") String subject,
+ @HeaderParam("x-returnPath") String returnPath) throws Exception {
+ Object response = producerTemplate
+ .to("aws2-ses:" + from)
+ .withHeader(Ses2Constants.TO, Collections.singletonList(to))
+ .withHeader(Ses2Constants.SUBJECT, subject)
+ .withHeader(Ses2Constants.RETURN_PATH, returnPath)
+ .withBody(message)
+ .request();
+
+ LOG.debugf("Message sent: %s", response);
+
+ return Response
+ .created(new URI("https://camel.apache.org/"))
+ .build();
+ }
+}
diff --git
a/integration-tests-aws2/aws2-ses/src/main/resources/application.properties
b/integration-tests-aws2/aws2-ses/src/main/resources/application.properties
new file mode 100644
index 0000000..a55a15a
--- /dev/null
+++ b/integration-tests-aws2/aws2-ses/src/main/resources/application.properties
@@ -0,0 +1,22 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements. See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+camel.component.aws2-ses.access-key=${AWS_ACCESS_KEY}
+camel.component.aws2-ses.secret-key=${AWS_SECRET_KEY}
+camel.component.aws2-ses.region=${AWS_REGION:us-east-1}
+
+mailslurp.api.key=${MAILSLURP_API_KEY}
diff --git
a/integration-tests-aws2/aws2-ses/src/test/java/org/apache/camel/quarkus/component/aws2/ses/it/Aws2SesIT.java
b/integration-tests-aws2/aws2-ses/src/test/java/org/apache/camel/quarkus/component/aws2/ses/it/Aws2SesIT.java
new file mode 100644
index 0000000..42fae34
--- /dev/null
+++
b/integration-tests-aws2/aws2-ses/src/test/java/org/apache/camel/quarkus/component/aws2/ses/it/Aws2SesIT.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.aws2.ses.it;
+
+import io.quarkus.test.junit.NativeImageTest;
+import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
+
+//TODO disabled because of https://github.com/apache/camel-quarkus/issues/2216
+@EnabledIfEnvironmentVariable(named = "AWS_ACCESS_KEY", matches =
"[a-zA-Z0-9]+")
+@EnabledIfEnvironmentVariable(named = "MAILSLURP_API_KEY", matches =
"[a-zA-Z0-9]+")
+@NativeImageTest
+class Aws2SesIT extends Aws2SesTest {
+
+}
diff --git
a/integration-tests-aws2/aws2-ses/src/test/java/org/apache/camel/quarkus/component/aws2/ses/it/Aws2SesTest.java
b/integration-tests-aws2/aws2-ses/src/test/java/org/apache/camel/quarkus/component/aws2/ses/it/Aws2SesTest.java
new file mode 100644
index 0000000..2dc0b16
--- /dev/null
+++
b/integration-tests-aws2/aws2-ses/src/test/java/org/apache/camel/quarkus/component/aws2/ses/it/Aws2SesTest.java
@@ -0,0 +1,196 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.aws2.ses.it;
+
+import java.util.List;
+import java.util.Locale;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import io.quarkus.test.common.QuarkusTestResource;
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import io.restassured.http.ContentType;
+import io.restassured.path.json.JsonPath;
+import io.restassured.response.ExtractableResponse;
+import io.restassured.response.Response;
+import org.apache.camel.quarkus.test.support.aws2.Aws2Client;
+import org.apache.camel.quarkus.test.support.aws2.Aws2TestResource;
+import org.apache.commons.lang3.RandomStringUtils;
+import org.assertj.core.api.Assertions;
+import org.awaitility.Awaitility;
+import org.eclipse.microprofile.config.Config;
+import org.eclipse.microprofile.config.ConfigProvider;
+import org.hamcrest.Matchers;
+import org.jboss.logging.Logger;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.htmlunit.HtmlUnitDriver;
+import org.testcontainers.containers.localstack.LocalStackContainer.Service;
+import software.amazon.awssdk.services.ses.SesClient;
+import
software.amazon.awssdk.services.ses.model.DeleteVerifiedEmailAddressRequest;
+import software.amazon.awssdk.services.ses.model.VerifyEmailAddressRequest;
+
+//TODO disabled because of https://github.com/apache/camel-quarkus/issues/2216
+@EnabledIfEnvironmentVariable(named = "AWS_ACCESS_KEY", matches =
"[a-zA-Z0-9]+")
+@EnabledIfEnvironmentVariable(named = "MAILSLURP_API_KEY", matches =
"[a-zA-Z0-9]+")
+@QuarkusTest
+@QuarkusTestResource(Aws2TestResource.class)
+class Aws2SesTest {
+ private static final Logger LOG = Logger.getLogger(Aws2SesTest.class);
+
+ private static final Pattern VERIFCATION_LINK_PATTERN =
Pattern.compile("https://email-verification[^\\s]+");
+
+ @Aws2Client(Service.SES)
+ SesClient sesClient;
+
+ @Test
+ public void test() throws InterruptedException, ExecutionException,
TimeoutException {
+
+ /* First create a test mailbox at mailslurp.com */
+ final Config config = ConfigProvider.getConfig();
+ final String mailSlurpApiKey = config.getValue("mailslurp.api.key",
String.class);
+ final JsonPath mailbox = RestAssured.given()
+ .header("x-api-key", mailSlurpApiKey)
+ .post("https://api.mailslurp.com:443/createInbox") //
+ .then()
+ .statusCode(201)
+ .extract()
+ .body()
+ .jsonPath();
+
+ final String mailSlurpAddress = mailbox.get("emailAddress");
+ final String mailboxId = mailbox.get("id");
+ LOG.infof("Using mailslurp inbox id: %s", mailboxId);
+
+ /* Second, verify the mailslurp.com mailbox address at SES */
+ try {
+ /* Send the verification e-mail to mailslurp.com */
+ sesClient.verifyEmailAddress(
+ VerifyEmailAddressRequest.builder()
+ .emailAddress(mailSlurpAddress)
+ .build());
+
+ /* Await the verification e-mail at mailslurp.com */
+ List<String> messageIds = Awaitility.await()
+ .pollDelay(1, TimeUnit.SECONDS)
+ .pollInterval(1, TimeUnit.SECONDS)
+ .atMost(120, TimeUnit.SECONDS)
+ .until(
+ () -> {
+ final ExtractableResponse<Response> response =
RestAssured.given()
+ .header("x-api-key", mailSlurpApiKey)
+
.get("https://api.mailslurp.com:443/inboxes/" + mailboxId + "/emails") //
+ .then()
+ .statusCode(200)
+ .extract();
+ final List<String> ids =
response.jsonPath().getList("id");
+ LOG.infof("Expected an identity verification
message from SES; got %s",
+ response.body().asString());
+ return ids;
+ },
+ Matchers.not(Matchers.empty()));
+
+ /* Get the verification link out of the verification e-mail and
"click" it */
+ boolean verified = false;
+ for (String id : messageIds) {
+ final JsonPath email = RestAssured.given()
+ .header("x-api-key", mailSlurpApiKey)
+ .get("https://api.mailslurp.com:443/emails/" + id) //
+ .then()
+ .statusCode(200)
+ .extract()
+ .body()
+ .jsonPath();
+ String from = email.getString("from");
+ String body = email.getString("body");
+ LOG.debugf("Got e-mail from %s: %s", from, body);
+ Matcher m = VERIFCATION_LINK_PATTERN.matcher(body);
+ if (m.find()) {
+
+ final String link = m.group();
+ LOG.infof("Found verification link %s", link);
+
+ /*
+ * We use HtmlUnitDriver because RestAssured was not able
to follow the labyrinth of redirects and
+ * other traps
+ */
+ WebDriver driver = new HtmlUnitDriver();
+ driver.get(link);
+ String source = driver.getPageSource();
+ Assertions.assertThat(source).contains("You have
successfully verified an email address");
+ verified = true;
+ break;
+ }
+ }
+ Assertions.assertThat(verified).isTrue();
+
+ /* All prerequisites should be set up now, so we can send the
message via SES */
+ final String randomId =
RandomStringUtils.randomAlphanumeric(16).toLowerCase(Locale.ROOT);
+ final String subject = "Test " + randomId;
+ final String body = "Hello " + randomId;
+ LOG.infof("About to send message to %s with subject %s",
mailSlurpAddress, subject);
+ RestAssured.given() //
+ .contentType(ContentType.TEXT)
+ .header("x-from", mailSlurpAddress)
+ .header("x-to", mailSlurpAddress)
+ .header("x-subject", subject)
+ .header("x-returnPath", mailSlurpAddress)
+ .body(body)
+ .post("/aws2-ses/send") //
+ .then()
+ .statusCode(201);
+
+ /* Check that the message sent via SES was received in our test
mailbox at mailslurp.com */
+ Awaitility.await()
+ .pollDelay(1, TimeUnit.SECONDS)
+ .pollInterval(1, TimeUnit.SECONDS)
+ .atMost(120, TimeUnit.SECONDS)
+ .until(
+ () -> {
+ final ExtractableResponse<Response> response =
RestAssured.given()
+ .header("x-api-key", mailSlurpApiKey)
+
.get("https://api.mailslurp.com:443/inboxes/" + mailboxId + "/emails") //
+ .then()
+ .statusCode(200)
+ .extract();
+ final List<String> subjects =
response.jsonPath().getList("subject");
+ LOG.infof("Expected subject '%s'; got %s",
subject, response.body().asString());
+ return subjects;
+ },
+ Matchers.hasItem(subject));
+
+ } finally {
+
+ sesClient.deleteVerifiedEmailAddress(
+ DeleteVerifiedEmailAddressRequest.builder()
+ .emailAddress(mailSlurpAddress)
+ .build());
+
+ RestAssured.given()
+ .header("x-api-key", mailSlurpApiKey)
+ .delete("https://api.mailslurp.com:443/inboxes/" +
mailboxId) //
+ .then()
+ .statusCode(204);
+ }
+ }
+
+}
diff --git
a/integration-tests-aws2/aws2-ses/src/test/java/org/apache/camel/quarkus/component/aws2/ses/it/Aws2SesTestEnvCustomizer.java
b/integration-tests-aws2/aws2-ses/src/test/java/org/apache/camel/quarkus/component/aws2/ses/it/Aws2SesTestEnvCustomizer.java
new file mode 100644
index 0000000..88dfbac
--- /dev/null
+++
b/integration-tests-aws2/aws2-ses/src/test/java/org/apache/camel/quarkus/component/aws2/ses/it/Aws2SesTestEnvCustomizer.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.quarkus.component.aws2.ses.it;
+
+import org.apache.camel.quarkus.test.support.aws2.Aws2TestEnvContext;
+import org.apache.camel.quarkus.test.support.aws2.Aws2TestEnvCustomizer;
+import org.testcontainers.containers.localstack.LocalStackContainer.Service;
+
+public class Aws2SesTestEnvCustomizer implements Aws2TestEnvCustomizer {
+
+ @Override
+ public Service[] localstackServices() {
+ return new Service[] { Service.SES };
+ }
+
+ @Override
+ public void customize(Aws2TestEnvContext envContext) {
+
+ }
+}
diff --git
a/integration-tests-aws2/aws2-ses/src/test/resources/META-INF/services/org.apache.camel.quarkus.test.support.aws2.Aws2TestEnvCustomizer
b/integration-tests-aws2/aws2-ses/src/test/resources/META-INF/services/org.apache.camel.quarkus.test.support.aws2.Aws2TestEnvCustomizer
new file mode 100644
index 0000000..5a0d9bd
--- /dev/null
+++
b/integration-tests-aws2/aws2-ses/src/test/resources/META-INF/services/org.apache.camel.quarkus.test.support.aws2.Aws2TestEnvCustomizer
@@ -0,0 +1 @@
+org.apache.camel.quarkus.component.aws2.ses.it.Aws2SesTestEnvCustomizer
\ No newline at end of file
diff --git a/integration-tests-aws2/pom.xml b/integration-tests-aws2/pom.xml
index 9a74761..a5995f6 100644
--- a/integration-tests-aws2/pom.xml
+++ b/integration-tests-aws2/pom.xml
@@ -43,6 +43,7 @@
<module>aws2-kinesis</module>
<module>aws2-lambda</module>
<module>aws2-s3</module>
+ <module>aws2-ses</module>
<module>aws2-sqs-sns</module>
</modules>
diff --git
a/integration-tests-support/aws2/src/main/java/org/apache/camel/quarkus/test/support/aws2/Aws2TestEnvContext.java
b/integration-tests-support/aws2/src/main/java/org/apache/camel/quarkus/test/support/aws2/Aws2TestEnvContext.java
index 2d057ae..3c23d88 100644
---
a/integration-tests-support/aws2/src/main/java/org/apache/camel/quarkus/test/support/aws2/Aws2TestEnvContext.java
+++
b/integration-tests-support/aws2/src/main/java/org/apache/camel/quarkus/test/support/aws2/Aws2TestEnvContext.java
@@ -67,19 +67,16 @@ public class Aws2TestEnvContext {
properties.put("camel.component.aws2-" + s + ".region",
region);
switch (service) {
- case SQS:
- case SNS:
- case DYNAMODB:
- case DYNAMODB_STREAMS:
- case CLOUDWATCH:
- case LAMBDA:
- // TODO
https://github.com/apache/camel-quarkus/issues/2216
- break;
- default:
+ case S3:
+ case KINESIS:
+ case FIREHOSE:
properties.put("camel.component.aws2-" + s +
".override-endpoint", "true");
properties.put("camel.component.aws2-" + s +
".uri-endpoint-override",
ls.getEndpointOverride(service).toString());
break;
+ default:
+ // TODO
https://github.com/apache/camel-quarkus/issues/2216
+ break;
}
}
}
diff --git a/integration-tests/aws2-grouped/README.adoc
b/integration-tests/aws2-grouped/README.adoc
index 0bb87fa..9be5942 100644
--- a/integration-tests/aws2-grouped/README.adoc
+++ b/integration-tests/aws2-grouped/README.adoc
@@ -17,4 +17,4 @@ if, in the given situation, the speed matters more than
isolation.
=== Mock backend vs. real service
-Please refer to the README files in `integration-tests-aws2` for more details.
+Please refer to
link:../../integration-tests-aws2/README.adoc[integration-tests-aws2/README.adoc]
for more details.
diff --git a/integration-tests/aws2-grouped/pom.xml
b/integration-tests/aws2-grouped/pom.xml
index c7af25e..f5ed8de 100644
--- a/integration-tests/aws2-grouped/pom.xml
+++ b/integration-tests/aws2-grouped/pom.xml
@@ -77,6 +77,10 @@
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-aws2-ses</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-aws2-sns</artifactId>
</dependency>
<dependency>
@@ -108,6 +112,11 @@
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>org.seleniumhq.selenium</groupId>
+ <artifactId>htmlunit-driver</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>iam</artifactId>
<scope>test</scope>
@@ -181,6 +190,19 @@
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-aws2-ses-deployment</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-aws2-sns-deployment</artifactId>
<version>${project.version}</version>
<type>pom</type>
diff --git a/pom.xml b/pom.xml
index cd1525c..5a472b2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -136,6 +136,7 @@
<ftpserver.version>1.1.1</ftpserver.version>
<istack-commons-runtime.version>3.0.10</istack-commons-runtime.version>
<jakarta.mail.version>${jakarta-mail-version}</jakarta.mail.version>
+ <htmlunit-driver.version>2.47.1</htmlunit-driver.version>
<mock-javamail.version>${mock-javamail-version}</mock-javamail.version>
<pdfbox.version>${pdfbox-version}</pdfbox.version>
<slf4j-log4j12.version>1.7.30</slf4j-log4j12.version><!-- Mess in the
transitive dependencies of hbase-testing-util -->
diff --git a/poms/bom-test/pom.xml b/poms/bom-test/pom.xml
index 95b8762..223359a 100644
--- a/poms/bom-test/pom.xml
+++ b/poms/bom-test/pom.xml
@@ -222,6 +222,11 @@
</exclusions>
</dependency>
<dependency>
+ <groupId>org.seleniumhq.selenium</groupId>
+ <artifactId>htmlunit-driver</artifactId>
+ <version>${htmlunit-driver.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.zeroturnaround</groupId>
<artifactId>zt-exec</artifactId>
<version>${zt-exec.version}</version>