diff --git a/components/camel-azure/camel-azure-storage-blob/src/test/java/org/apache/camel/component/azure/storage/blob/integration/Base.java b/components/camel-azure/camel-azure-storage-blob/src/test/java/org/apache/camel/component/azure/storage/blob/integration/Base.java index d863f222f31f0..6b7d4a881d0f5 100644 --- a/components/camel-azure/camel-azure-storage-blob/src/test/java/org/apache/camel/component/azure/storage/blob/integration/Base.java +++ b/components/camel-azure/camel-azure-storage-blob/src/test/java/org/apache/camel/component/azure/storage/blob/integration/Base.java @@ -21,7 +21,7 @@ import org.apache.camel.CamelContext; import org.apache.camel.component.azure.storage.blob.BlobConfiguration; import org.apache.camel.test.infra.azure.common.AzureConfigs; -import org.apache.camel.test.infra.azure.common.services.AzureService; +import org.apache.camel.test.infra.azure.common.services.AzureTestService; import org.apache.camel.test.infra.azure.storage.blob.clients.AzureStorageBlobClientUtils; import org.apache.camel.test.infra.azure.storage.blob.services.AzureStorageBlobServiceFactory; import org.apache.camel.test.junit5.CamelTestSupport; @@ -36,7 +36,7 @@ @TestInstance(TestInstance.Lifecycle.PER_CLASS) public class Base extends CamelTestSupport { @RegisterExtension - public static AzureService service; + public static AzureTestService service; protected BlobServiceClient serviceClient; protected String containerName; diff --git a/components/camel-azure/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/Base.java b/components/camel-azure/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/Base.java index bb6d4d2436709..8eee274d16382 100644 --- a/components/camel-azure/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/Base.java +++ b/components/camel-azure/camel-azure-storage-datalake/src/test/java/org/apache/camel/component/azure/storage/datalake/integration/Base.java @@ -27,7 +27,7 @@ import org.apache.camel.CamelContext; import org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration; import org.apache.camel.test.infra.azure.common.AzureConfigs; -import org.apache.camel.test.infra.azure.common.services.AzureService; +import org.apache.camel.test.infra.azure.common.services.AzureTestService; import org.apache.camel.test.infra.azure.storage.datalake.clients.AzureStorageDataLakeClientUtils; import org.apache.camel.test.infra.azure.storage.datalake.services.AzureStorageDataLakeServiceFactory; import org.apache.camel.test.junit5.CamelTestSupport; @@ -42,7 +42,7 @@ public class Base extends CamelTestSupport { @RegisterExtension - public AzureService service = AzureStorageDataLakeServiceFactory.createService(); + public AzureTestService service = AzureStorageDataLakeServiceFactory.createService(); protected DataLakeServiceClient serviceClient; protected DataLakeConfiguration configuration; diff --git a/components/camel-azure/camel-azure-storage-queue/src/test/java/org/apache/camel/component/azure/storage/queue/integration/StorageQueueBase.java b/components/camel-azure/camel-azure-storage-queue/src/test/java/org/apache/camel/component/azure/storage/queue/integration/StorageQueueBase.java index 4ec39797b0063..06239d72a7751 100644 --- a/components/camel-azure/camel-azure-storage-queue/src/test/java/org/apache/camel/component/azure/storage/queue/integration/StorageQueueBase.java +++ b/components/camel-azure/camel-azure-storage-queue/src/test/java/org/apache/camel/component/azure/storage/queue/integration/StorageQueueBase.java @@ -21,7 +21,7 @@ import org.apache.camel.CamelContext; import org.apache.camel.component.azure.storage.queue.QueueConfiguration; import org.apache.camel.test.infra.azure.common.AzureConfigs; -import org.apache.camel.test.infra.azure.common.services.AzureService; +import org.apache.camel.test.infra.azure.common.services.AzureTestService; import org.apache.camel.test.infra.azure.storage.queue.clients.AzureStorageClientUtils; import org.apache.camel.test.infra.azure.storage.queue.services.AzureStorageQueueServiceFactory; import org.apache.camel.test.junit5.CamelTestSupport; @@ -34,7 +34,7 @@ @TestInstance(TestInstance.Lifecycle.PER_CLASS) public class StorageQueueBase extends CamelTestSupport { @RegisterExtension - public static AzureService service; + public static AzureTestService service; protected QueueServiceClient serviceClient; protected String queueName; diff --git a/test-infra/camel-test-infra-azure-common/pom.xml b/test-infra/camel-test-infra-azure-common/pom.xml index ad0bd0e3905c3..ea6f48d1f7342 100644 --- a/test-infra/camel-test-infra-azure-common/pom.xml +++ b/test-infra/camel-test-infra-azure-common/pom.xml @@ -36,6 +36,16 @@ ${project.version} test-jar + + org.apache.camel + camel-test-infra-common + ${project.version} + + + org.testcontainers + testcontainers + ${testcontainers-version} + \ No newline at end of file diff --git a/test-infra/camel-test-infra-azure-common/src/test/java/org/apache/camel/test/infra/azure/common/AzureConfigs.java b/test-infra/camel-test-infra-azure-common/src/main/java/org/apache/camel/test/infra/azure/common/AzureConfigs.java similarity index 100% rename from test-infra/camel-test-infra-azure-common/src/test/java/org/apache/camel/test/infra/azure/common/AzureConfigs.java rename to test-infra/camel-test-infra-azure-common/src/main/java/org/apache/camel/test/infra/azure/common/AzureConfigs.java diff --git a/test-infra/camel-test-infra-azure-common/src/test/java/org/apache/camel/test/infra/azure/common/AzureCredentialsHolder.java b/test-infra/camel-test-infra-azure-common/src/main/java/org/apache/camel/test/infra/azure/common/AzureCredentialsHolder.java similarity index 100% rename from test-infra/camel-test-infra-azure-common/src/test/java/org/apache/camel/test/infra/azure/common/AzureCredentialsHolder.java rename to test-infra/camel-test-infra-azure-common/src/main/java/org/apache/camel/test/infra/azure/common/AzureCredentialsHolder.java diff --git a/test-infra/camel-test-infra-azure-common/src/test/java/org/apache/camel/test/infra/azure/common/AzureProperties.java b/test-infra/camel-test-infra-azure-common/src/main/java/org/apache/camel/test/infra/azure/common/AzureProperties.java similarity index 100% rename from test-infra/camel-test-infra-azure-common/src/test/java/org/apache/camel/test/infra/azure/common/AzureProperties.java rename to test-infra/camel-test-infra-azure-common/src/main/java/org/apache/camel/test/infra/azure/common/AzureProperties.java diff --git a/test-infra/camel-test-infra-azure-common/src/test/java/org/apache/camel/test/infra/azure/common/services/AzureService.java b/test-infra/camel-test-infra-azure-common/src/main/java/org/apache/camel/test/infra/azure/common/services/AzureService.java similarity index 88% rename from test-infra/camel-test-infra-azure-common/src/test/java/org/apache/camel/test/infra/azure/common/services/AzureService.java rename to test-infra/camel-test-infra-azure-common/src/main/java/org/apache/camel/test/infra/azure/common/services/AzureService.java index 39c46afa60da4..83358f7334078 100644 --- a/test-infra/camel-test-infra-azure-common/src/test/java/org/apache/camel/test/infra/azure/common/services/AzureService.java +++ b/test-infra/camel-test-infra-azure-common/src/main/java/org/apache/camel/test/infra/azure/common/services/AzureService.java @@ -18,9 +18,9 @@ package org.apache.camel.test.infra.azure.common.services; import org.apache.camel.test.infra.azure.common.AzureCredentialsHolder; -import org.apache.camel.test.infra.common.services.TestService; +import org.apache.camel.test.infra.common.services.InfrastructureService; -public interface AzureService extends TestService { +public interface AzureService extends InfrastructureService { /** * Gets the credentials for the test service diff --git a/test-infra/camel-test-infra-azure-common/src/test/java/org/apache/camel/test/infra/azure/common/services/AzureServices.java b/test-infra/camel-test-infra-azure-common/src/main/java/org/apache/camel/test/infra/azure/common/services/AzureServices.java similarity index 100% rename from test-infra/camel-test-infra-azure-common/src/test/java/org/apache/camel/test/infra/azure/common/services/AzureServices.java rename to test-infra/camel-test-infra-azure-common/src/main/java/org/apache/camel/test/infra/azure/common/services/AzureServices.java diff --git a/test-infra/camel-test-infra-azure-common/src/test/java/org/apache/camel/test/infra/azure/common/services/AzureStorageService.java b/test-infra/camel-test-infra-azure-common/src/main/java/org/apache/camel/test/infra/azure/common/services/AzureStorageService.java similarity index 100% rename from test-infra/camel-test-infra-azure-common/src/test/java/org/apache/camel/test/infra/azure/common/services/AzureStorageService.java rename to test-infra/camel-test-infra-azure-common/src/main/java/org/apache/camel/test/infra/azure/common/services/AzureStorageService.java diff --git a/test-infra/camel-test-infra-azure-common/src/test/java/org/apache/camel/test/infra/azure/common/services/AzuriteContainer.java b/test-infra/camel-test-infra-azure-common/src/main/java/org/apache/camel/test/infra/azure/common/services/AzuriteContainer.java similarity index 100% rename from test-infra/camel-test-infra-azure-common/src/test/java/org/apache/camel/test/infra/azure/common/services/AzuriteContainer.java rename to test-infra/camel-test-infra-azure-common/src/main/java/org/apache/camel/test/infra/azure/common/services/AzuriteContainer.java diff --git a/test-infra/camel-test-infra-azure-common/src/test/java/org/apache/camel/test/infra/azure/common/services/AzureTestService.java b/test-infra/camel-test-infra-azure-common/src/test/java/org/apache/camel/test/infra/azure/common/services/AzureTestService.java new file mode 100644 index 0000000000000..81b3d4b2f443b --- /dev/null +++ b/test-infra/camel-test-infra-azure-common/src/test/java/org/apache/camel/test/infra/azure/common/services/AzureTestService.java @@ -0,0 +1,23 @@ +/* + * 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.test.infra.azure.common.services; + +import org.apache.camel.test.infra.common.services.ContainerTestService; +import org.apache.camel.test.infra.common.services.TestService; + +public interface AzureTestService extends AzureService, TestService, ContainerTestService { +} diff --git a/test-infra/camel-test-infra-azure-storage-blob/pom.xml b/test-infra/camel-test-infra-azure-storage-blob/pom.xml index 1d23dfc18c25d..9119a2f2be84d 100644 --- a/test-infra/camel-test-infra-azure-storage-blob/pom.xml +++ b/test-infra/camel-test-infra-azure-storage-blob/pom.xml @@ -55,6 +55,11 @@ ${project.version} test-jar + + org.apache.camel + camel-test-infra-azure-common + ${project.version} + org.testcontainers diff --git a/test-infra/camel-test-infra-azure-storage-blob/src/test/java/org/apache/camel/test/infra/azure/storage/blob/clients/AzureStorageBlobClientUtils.java b/test-infra/camel-test-infra-azure-storage-blob/src/main/java/org/apache/camel/test/infra/azure/storage/blob/clients/AzureStorageBlobClientUtils.java similarity index 100% rename from test-infra/camel-test-infra-azure-storage-blob/src/test/java/org/apache/camel/test/infra/azure/storage/blob/clients/AzureStorageBlobClientUtils.java rename to test-infra/camel-test-infra-azure-storage-blob/src/main/java/org/apache/camel/test/infra/azure/storage/blob/clients/AzureStorageBlobClientUtils.java diff --git a/test-infra/camel-test-infra-azure-storage-blob/src/test/java/org/apache/camel/test/infra/azure/storage/blob/services/AzureStorageBlobLocalContainerService.java b/test-infra/camel-test-infra-azure-storage-blob/src/main/java/org/apache/camel/test/infra/azure/storage/blob/services/AzureStorageBlobLocalContainerService.java similarity index 100% rename from test-infra/camel-test-infra-azure-storage-blob/src/test/java/org/apache/camel/test/infra/azure/storage/blob/services/AzureStorageBlobLocalContainerService.java rename to test-infra/camel-test-infra-azure-storage-blob/src/main/java/org/apache/camel/test/infra/azure/storage/blob/services/AzureStorageBlobLocalContainerService.java diff --git a/test-infra/camel-test-infra-azure-storage-blob/src/test/java/org/apache/camel/test/infra/azure/storage/blob/services/AzureStorageBlobRemoteService.java b/test-infra/camel-test-infra-azure-storage-blob/src/main/java/org/apache/camel/test/infra/azure/storage/blob/services/AzureStorageBlobRemoteService.java similarity index 100% rename from test-infra/camel-test-infra-azure-storage-blob/src/test/java/org/apache/camel/test/infra/azure/storage/blob/services/AzureStorageBlobRemoteService.java rename to test-infra/camel-test-infra-azure-storage-blob/src/main/java/org/apache/camel/test/infra/azure/storage/blob/services/AzureStorageBlobRemoteService.java diff --git a/test-infra/camel-test-infra-azure-storage-blob/src/test/java/org/apache/camel/test/infra/azure/storage/blob/services/AzureStorageBlobServiceFactory.java b/test-infra/camel-test-infra-azure-storage-blob/src/test/java/org/apache/camel/test/infra/azure/storage/blob/services/AzureStorageBlobServiceFactory.java index 201ee05173f8e..45dbb5e5b5801 100644 --- a/test-infra/camel-test-infra-azure-storage-blob/src/test/java/org/apache/camel/test/infra/azure/storage/blob/services/AzureStorageBlobServiceFactory.java +++ b/test-infra/camel-test-infra-azure-storage-blob/src/test/java/org/apache/camel/test/infra/azure/storage/blob/services/AzureStorageBlobServiceFactory.java @@ -17,7 +17,7 @@ package org.apache.camel.test.infra.azure.storage.blob.services; -import org.apache.camel.test.infra.azure.common.services.AzureService; +import org.apache.camel.test.infra.azure.common.services.AzureTestService; import org.apache.camel.test.infra.common.services.SimpleTestServiceBuilder; public final class AzureStorageBlobServiceFactory { @@ -25,14 +25,21 @@ private AzureStorageBlobServiceFactory() { } - public static SimpleTestServiceBuilder builder() { + public static SimpleTestServiceBuilder builder() { return new SimpleTestServiceBuilder<>("azure"); } - public static AzureService createService() { + public static AzureTestService createService() { return builder() - .addLocalMapping(AzureStorageBlobLocalContainerService::new) - .addRemoteMapping(AzureStorageBlobRemoteService::new) + .addLocalMapping(AzureStorageBlobLocalContainerTestService::new) + .addRemoteMapping(AzureStorageBlobRemoteTestService::new) .build(); } + + static class AzureStorageBlobLocalContainerTestService extends AzureStorageBlobLocalContainerService + implements AzureTestService { + } + + static class AzureStorageBlobRemoteTestService extends AzureStorageBlobRemoteService implements AzureTestService { + } } diff --git a/test-infra/camel-test-infra-azure-storage-datalake/pom.xml b/test-infra/camel-test-infra-azure-storage-datalake/pom.xml index 55333a2e273fd..32c43d9e857d3 100644 --- a/test-infra/camel-test-infra-azure-storage-datalake/pom.xml +++ b/test-infra/camel-test-infra-azure-storage-datalake/pom.xml @@ -55,6 +55,11 @@ ${project.version} test-jar + + org.apache.camel + camel-test-infra-azure-common + ${project.version} + diff --git a/test-infra/camel-test-infra-azure-storage-datalake/src/test/java/org/apache/camel/test/infra/azure/storage/datalake/clients/AzureStorageDataLakeClientUtils.java b/test-infra/camel-test-infra-azure-storage-datalake/src/main/java/org/apache/camel/test/infra/azure/storage/datalake/clients/AzureStorageDataLakeClientUtils.java similarity index 100% rename from test-infra/camel-test-infra-azure-storage-datalake/src/test/java/org/apache/camel/test/infra/azure/storage/datalake/clients/AzureStorageDataLakeClientUtils.java rename to test-infra/camel-test-infra-azure-storage-datalake/src/main/java/org/apache/camel/test/infra/azure/storage/datalake/clients/AzureStorageDataLakeClientUtils.java diff --git a/test-infra/camel-test-infra-azure-storage-datalake/src/test/java/org/apache/camel/test/infra/azure/storage/datalake/services/AzureStorageDataLakeRemoteService.java b/test-infra/camel-test-infra-azure-storage-datalake/src/main/java/org/apache/camel/test/infra/azure/storage/datalake/services/AzureStorageDataLakeRemoteService.java similarity index 100% rename from test-infra/camel-test-infra-azure-storage-datalake/src/test/java/org/apache/camel/test/infra/azure/storage/datalake/services/AzureStorageDataLakeRemoteService.java rename to test-infra/camel-test-infra-azure-storage-datalake/src/main/java/org/apache/camel/test/infra/azure/storage/datalake/services/AzureStorageDataLakeRemoteService.java diff --git a/test-infra/camel-test-infra-azure-storage-datalake/src/test/java/org/apache/camel/test/infra/azure/storage/datalake/services/AzureStorageDataLakeServiceFactory.java b/test-infra/camel-test-infra-azure-storage-datalake/src/test/java/org/apache/camel/test/infra/azure/storage/datalake/services/AzureStorageDataLakeServiceFactory.java index 31adc7f0269b4..7aa646982e77b 100644 --- a/test-infra/camel-test-infra-azure-storage-datalake/src/test/java/org/apache/camel/test/infra/azure/storage/datalake/services/AzureStorageDataLakeServiceFactory.java +++ b/test-infra/camel-test-infra-azure-storage-datalake/src/test/java/org/apache/camel/test/infra/azure/storage/datalake/services/AzureStorageDataLakeServiceFactory.java @@ -17,7 +17,7 @@ package org.apache.camel.test.infra.azure.storage.datalake.services; -import org.apache.camel.test.infra.azure.common.services.AzureService; +import org.apache.camel.test.infra.azure.common.services.AzureTestService; import org.apache.camel.test.infra.common.services.SimpleTestServiceBuilder; public final class AzureStorageDataLakeServiceFactory { @@ -26,13 +26,16 @@ private AzureStorageDataLakeServiceFactory() { } - public static SimpleTestServiceBuilder builder() { + public static SimpleTestServiceBuilder builder() { return new SimpleTestServiceBuilder<>("azure"); } - public static AzureService createService() { + public static AzureTestService createService() { return builder() - .addRemoteMapping(AzureStorageDataLakeRemoteService::new) + .addRemoteMapping(AzureStorageDataLakeRemoteTestService::new) .build(); } + + static class AzureStorageDataLakeRemoteTestService extends AzureStorageDataLakeRemoteService implements AzureTestService { + } } diff --git a/test-infra/camel-test-infra-azure-storage-queue/pom.xml b/test-infra/camel-test-infra-azure-storage-queue/pom.xml index 479cdc00636f7..fb36e54523e40 100644 --- a/test-infra/camel-test-infra-azure-storage-queue/pom.xml +++ b/test-infra/camel-test-infra-azure-storage-queue/pom.xml @@ -55,6 +55,11 @@ ${project.version} test-jar + + org.apache.camel + camel-test-infra-azure-common + ${project.version} + org.testcontainers diff --git a/test-infra/camel-test-infra-azure-storage-queue/src/test/java/org/apache/camel/test/infra/azure/storage/queue/clients/AzureStorageClientUtils.java b/test-infra/camel-test-infra-azure-storage-queue/src/main/java/org/apache/camel/test/infra/azure/storage/queue/clients/AzureStorageClientUtils.java similarity index 100% rename from test-infra/camel-test-infra-azure-storage-queue/src/test/java/org/apache/camel/test/infra/azure/storage/queue/clients/AzureStorageClientUtils.java rename to test-infra/camel-test-infra-azure-storage-queue/src/main/java/org/apache/camel/test/infra/azure/storage/queue/clients/AzureStorageClientUtils.java diff --git a/test-infra/camel-test-infra-azure-storage-queue/src/test/java/org/apache/camel/test/infra/azure/storage/queue/services/AzureStorageQueueLocalContainerService.java b/test-infra/camel-test-infra-azure-storage-queue/src/main/java/org/apache/camel/test/infra/azure/storage/queue/services/AzureStorageQueueLocalContainerService.java similarity index 100% rename from test-infra/camel-test-infra-azure-storage-queue/src/test/java/org/apache/camel/test/infra/azure/storage/queue/services/AzureStorageQueueLocalContainerService.java rename to test-infra/camel-test-infra-azure-storage-queue/src/main/java/org/apache/camel/test/infra/azure/storage/queue/services/AzureStorageQueueLocalContainerService.java diff --git a/test-infra/camel-test-infra-azure-storage-queue/src/test/java/org/apache/camel/test/infra/azure/storage/queue/services/AzureStorageQueueRemoteService.java b/test-infra/camel-test-infra-azure-storage-queue/src/main/java/org/apache/camel/test/infra/azure/storage/queue/services/AzureStorageQueueRemoteService.java similarity index 100% rename from test-infra/camel-test-infra-azure-storage-queue/src/test/java/org/apache/camel/test/infra/azure/storage/queue/services/AzureStorageQueueRemoteService.java rename to test-infra/camel-test-infra-azure-storage-queue/src/main/java/org/apache/camel/test/infra/azure/storage/queue/services/AzureStorageQueueRemoteService.java diff --git a/test-infra/camel-test-infra-azure-storage-queue/src/test/java/org/apache/camel/test/infra/azure/storage/queue/services/AzureStorageQueueServiceFactory.java b/test-infra/camel-test-infra-azure-storage-queue/src/test/java/org/apache/camel/test/infra/azure/storage/queue/services/AzureStorageQueueServiceFactory.java index eda258b89229e..b7f277f268001 100644 --- a/test-infra/camel-test-infra-azure-storage-queue/src/test/java/org/apache/camel/test/infra/azure/storage/queue/services/AzureStorageQueueServiceFactory.java +++ b/test-infra/camel-test-infra-azure-storage-queue/src/test/java/org/apache/camel/test/infra/azure/storage/queue/services/AzureStorageQueueServiceFactory.java @@ -17,7 +17,7 @@ package org.apache.camel.test.infra.azure.storage.queue.services; -import org.apache.camel.test.infra.azure.common.services.AzureService; +import org.apache.camel.test.infra.azure.common.services.AzureTestService; import org.apache.camel.test.infra.common.services.SimpleTestServiceBuilder; public final class AzureStorageQueueServiceFactory { @@ -25,14 +25,21 @@ private AzureStorageQueueServiceFactory() { } - public static SimpleTestServiceBuilder builder() { + public static SimpleTestServiceBuilder builder() { return new SimpleTestServiceBuilder<>("azure"); } - public static AzureService createService() { + public static AzureTestService createService() { return builder() - .addLocalMapping(AzureStorageQueueLocalContainerService::new) - .addRemoteMapping(AzureStorageQueueRemoteService::new) + .addLocalMapping(AzureStorageQueueLocalContainerTestService::new) + .addRemoteMapping(AzureStorageQueueRemoteTestService::new) .build(); } + + public static class AzureStorageQueueLocalContainerTestService extends AzureStorageQueueLocalContainerService + implements AzureTestService { + } + + public static class AzureStorageQueueRemoteTestService extends AzureStorageQueueRemoteService implements AzureTestService { + } }