Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions components/camel-aws/camel-aws2-sqs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,11 @@ It is possible to run the tests on a remote docker server by overwriting the val
DOCKER_HOST=tcp://myhost:2375 mvn clean verify
```

# Force running the integration tests

Should you need to force the execution of the integration tests, despite the value of the DOCKER_HOST variable, you can
do so by enabling the `aws2-sqs-tests-docker-env` profile:


```
mvn -Paws2-sqs-tests-docker-env clean test verify
```

# Running the tests against AWS

You can define the `aws-service.instance.type`, `aws.access.key` and `aws.secret.key` to switch the test execution from
using LocalStack and, instead, using AWS:

```
mvn -Paws2-sqs-tests-docker-env -Daws-service.instance.type=remote -Daws.access.key=you-access-key -Daws.secret.key=you-secret-key clean test verify
```
```
117 changes: 8 additions & 109 deletions components/camel-aws/camel-aws2-sqs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,113 +99,12 @@
</dependency>
</dependencies>

<profiles>
<profile>
<id>aws2-sqs-skip-tests</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</build>
</profile>

<!-- activate test if the docker socket file is accessible -->
<profile>
<id>aws2-sqs-tests-docker-file</id>
<activation>
<file>
<exists>/var/run/docker.sock</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>${skipTests}</skipTests>
<systemPropertyVariables>
<visibleassertions.silence>true</visibleassertions.silence>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<skipTests>${skipTests}</skipTests>
<reuseForks>true</reuseForks>
<systemPropertyVariables>
<visibleassertions.silence>true</visibleassertions.silence>
</systemPropertyVariables>
<includes>
<include>**/*IntegrationTest.java</include>
</includes>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

<!-- activate test if the DOCKER_HOST env var is set -->
<profile>
<id>aws2-sqs-tests-docker-env</id>
<activation>
<property>
<name>env.DOCKER_HOST</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>${skipTests}</skipTests>
<systemPropertyVariables>
<visibleassertions.silence>true</visibleassertions.silence>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<skipTests>${skipTests}</skipTests>
<reuseForks>true</reuseForks>
<systemPropertyVariables>
<visibleassertions.silence>true</visibleassertions.silence>
</systemPropertyVariables>
<includes>
<include>**/*IntegrationTest.java</include>
</includes>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>

</plugins>
</build>
</profile>
</profiles>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.camel.component.aws2.sqs.localstack;
package org.apache.camel.component.aws2.sqs.integration;

import org.apache.camel.CamelContext;
import org.apache.camel.component.aws2.sqs.Sqs2Component;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.camel.component.aws2.sqs.localstack;
package org.apache.camel.component.aws2.sqs.integration;

import org.apache.camel.EndpointInject;
import org.apache.camel.Exchange;
Expand All @@ -29,7 +29,7 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;

public class SqsComponentLocalstackTest extends Aws2SQSBaseTest {
public class SqsComponentLocalstackIT extends Aws2SQSBaseTest {

@EndpointInject("direct:start")
private ProducerTemplate template;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.camel.component.aws2.sqs.localstack;
package org.apache.camel.component.aws2.sqs.integration;

import org.apache.camel.EndpointInject;
import org.apache.camel.Exchange;
Expand All @@ -25,7 +25,7 @@
import org.apache.camel.component.mock.MockEndpoint;
import org.junit.jupiter.api.Test;

public class SqsConsumerMessageLocalstackTest extends Aws2SQSBaseTest {
public class SqsConsumerMessageLocalstackIT extends Aws2SQSBaseTest {

@EndpointInject("direct:start")
private ProducerTemplate template;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.camel.component.aws2.sqs.localstack;
package org.apache.camel.component.aws2.sqs.integration;

import java.util.ArrayList;
import java.util.Collection;
Expand All @@ -29,7 +29,7 @@
import org.apache.camel.component.mock.MockEndpoint;
import org.junit.jupiter.api.Test;

public class SqsProducerBatchSendFifoLocalstackTest extends Aws2SQSBaseTest {
public class SqsProducerBatchSendFifoLocalstackIT extends Aws2SQSBaseTest {

@EndpointInject("direct:start")
private ProducerTemplate template;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.camel.component.aws2.sqs.localstack;
package org.apache.camel.component.aws2.sqs.integration;

import java.util.ArrayList;
import java.util.Collection;
Expand All @@ -29,7 +29,7 @@
import org.apache.camel.component.mock.MockEndpoint;
import org.junit.jupiter.api.Test;

public class SqsProducerBatchSendLocalstackTest extends Aws2SQSBaseTest {
public class SqsProducerBatchSendLocalstackIT extends Aws2SQSBaseTest {

@EndpointInject("direct:start")
private ProducerTemplate template;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.camel.component.aws2.sqs.localstack;
package org.apache.camel.component.aws2.sqs.integration;

import org.apache.camel.EndpointInject;
import org.apache.camel.Exchange;
Expand All @@ -26,7 +26,7 @@
import org.apache.camel.component.mock.MockEndpoint;
import org.junit.jupiter.api.Test;

public class SqsProducerBatchSendWithSeparatorLocalstackTest extends Aws2SQSBaseTest {
public class SqsProducerBatchSendWithSeparatorLocalstackIT extends Aws2SQSBaseTest {

@EndpointInject("direct:start")
private ProducerTemplate template;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.camel.component.aws2.sqs.localstack;
package org.apache.camel.component.aws2.sqs.integration;

import org.apache.camel.EndpointInject;
import org.apache.camel.Exchange;
Expand All @@ -25,7 +25,7 @@
import org.apache.camel.component.mock.MockEndpoint;
import org.junit.jupiter.api.Test;

public class SqsProducerDeleteMessageLocalstackTest extends Aws2SQSBaseTest {
public class SqsProducerDeleteMessageLocalstackIT extends Aws2SQSBaseTest {

@EndpointInject("direct:start")
private ProducerTemplate template;
Expand Down
18 changes: 18 additions & 0 deletions components/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,24 @@
</properties>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<id>integration-test</id>
<phase>verify</phase>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.camel</groupId>
Expand Down