You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2021/01/13 09:14:23 UTC

[camel-kafka-connector] branch master updated (641efc4 -> b03b70c)

This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel-kafka-connector.git.


    from 641efc4  Fix test lifecycle when using Strimzi containers
     new b6b73c7  Convert Azure storage blob tests to the new test infra
     new 1ac7ec3  Convert Azure storage queue tests to the new test infra
     new b03b70c  Removed the outdated Azure common module as it's not required for the Azure tests

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 tests/itests-azure-common/pom.xml                  | 59 --------------------
 .../kafkaconnector/azure/common/AzureConfigs.java  | 29 ----------
 .../azure/common/AzureCredentialsHolder.java       | 23 --------
 .../azure/common/services/AzureService.java        | 54 -------------------
 .../azure/common/services/AzureServices.java       | 26 ---------
 .../azure/common/services/AzureStorageService.java | 47 ----------------
 .../azure/common/services/AzuriteContainer.java    | 56 -------------------
 tests/itests-azure-storage-blob/pom.xml            | 33 +++++++++---
 .../blob/sink/CamelSinkAzureStorageBlobITCase.java |  8 +--
 .../storage/blob/sink/TestBlobConfiguration.java   |  2 +-
 .../services/AzureStorageBlobClientUtils.java      | 63 ----------------------
 .../AzureStorageBlobLocalContainerService.java     | 41 --------------
 .../services/AzureStorageBlobRemoteService.java    | 51 ------------------
 .../services/AzureStorageBlobServiceFactory.java   | 45 ----------------
 tests/itests-azure-storage-queue/pom.xml           | 33 +++++++++---
 .../sink/CamelSinkAzureStorageQueueITCase.java     |  6 +--
 .../storage/services/AzureStorageClientUtils.java  |  3 +-
 .../AzureStorageQueueLocalContainerService.java    | 41 --------------
 .../services/AzureStorageQueueRemoteService.java   | 51 ------------------
 .../services/AzureStorageQueueServiceFactory.java  | 45 ----------------
 tests/pom.xml                                      |  1 -
 21 files changed, 60 insertions(+), 657 deletions(-)
 delete mode 100644 tests/itests-azure-common/pom.xml
 delete mode 100644 tests/itests-azure-common/src/test/java/org/apache/camel/kafkaconnector/azure/common/AzureConfigs.java
 delete mode 100644 tests/itests-azure-common/src/test/java/org/apache/camel/kafkaconnector/azure/common/AzureCredentialsHolder.java
 delete mode 100644 tests/itests-azure-common/src/test/java/org/apache/camel/kafkaconnector/azure/common/services/AzureService.java
 delete mode 100644 tests/itests-azure-common/src/test/java/org/apache/camel/kafkaconnector/azure/common/services/AzureServices.java
 delete mode 100644 tests/itests-azure-common/src/test/java/org/apache/camel/kafkaconnector/azure/common/services/AzureStorageService.java
 delete mode 100644 tests/itests-azure-common/src/test/java/org/apache/camel/kafkaconnector/azure/common/services/AzuriteContainer.java
 delete mode 100644 tests/itests-azure-storage-blob/src/test/java/org/apache/camel/kafkaconnector/azure/storage/services/AzureStorageBlobClientUtils.java
 delete mode 100644 tests/itests-azure-storage-blob/src/test/java/org/apache/camel/kafkaconnector/azure/storage/services/AzureStorageBlobLocalContainerService.java
 delete mode 100644 tests/itests-azure-storage-blob/src/test/java/org/apache/camel/kafkaconnector/azure/storage/services/AzureStorageBlobRemoteService.java
 delete mode 100644 tests/itests-azure-storage-blob/src/test/java/org/apache/camel/kafkaconnector/azure/storage/services/AzureStorageBlobServiceFactory.java
 delete mode 100644 tests/itests-azure-storage-queue/src/test/java/org/apache/camel/kafkaconnector/azure/storage/services/AzureStorageQueueLocalContainerService.java
 delete mode 100644 tests/itests-azure-storage-queue/src/test/java/org/apache/camel/kafkaconnector/azure/storage/services/AzureStorageQueueRemoteService.java
 delete mode 100644 tests/itests-azure-storage-queue/src/test/java/org/apache/camel/kafkaconnector/azure/storage/services/AzureStorageQueueServiceFactory.java


[camel-kafka-connector] 02/03: Convert Azure storage queue tests to the new test infra

Posted by or...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-kafka-connector.git

commit 1ac7ec3213cd9e08f0eda32aedc443d17dfc917b
Author: Otavio Rodolfo Piske <op...@redhat.com>
AuthorDate: Wed Jan 13 08:57:33 2021 +0100

    Convert Azure storage queue tests to the new test infra
---
 tests/itests-azure-storage-queue/pom.xml           | 33 ++++++++++----
 .../sink/CamelSinkAzureStorageQueueITCase.java     |  6 +--
 .../storage/services/AzureStorageClientUtils.java  |  3 +-
 .../AzureStorageQueueLocalContainerService.java    | 41 -----------------
 .../services/AzureStorageQueueRemoteService.java   | 51 ----------------------
 .../services/AzureStorageQueueServiceFactory.java  | 45 -------------------
 6 files changed, 30 insertions(+), 149 deletions(-)

diff --git a/tests/itests-azure-storage-queue/pom.xml b/tests/itests-azure-storage-queue/pom.xml
index 096d963..618eac0 100644
--- a/tests/itests-azure-storage-queue/pom.xml
+++ b/tests/itests-azure-storage-queue/pom.xml
@@ -41,14 +41,6 @@
             <scope>test</scope>
         </dependency>
 
-        <dependency>
-            <groupId>org.apache.camel.kafkaconnector</groupId>
-            <artifactId>itests-azure-common</artifactId>
-            <version>${project.version}</version>
-            <type>test-jar</type>
-            <scope>test</scope>
-        </dependency>
-
         <!--
             NOTE: the only reason we have this one here is because there is a conflict between the
             version of Netty used by the azure client and the one used within Kafka Connect.
@@ -68,6 +60,31 @@
             <artifactId>camel-azure-storage-queue</artifactId>
         </dependency>
 
+        <!-- test infra -->
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-test-infra-common</artifactId>
+            <version>${camel.version}</version>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-test-infra-azure-common</artifactId>
+            <version>${camel.version}</version>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-test-infra-azure-storage-queue</artifactId>
+            <version>${camel.version}</version>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+
     </dependencies>
 
 
diff --git a/tests/itests-azure-storage-queue/src/test/java/org/apache/camel/kafkaconnector/azure/storage/queue/sink/CamelSinkAzureStorageQueueITCase.java b/tests/itests-azure-storage-queue/src/test/java/org/apache/camel/kafkaconnector/azure/storage/queue/sink/CamelSinkAzureStorageQueueITCase.java
index 0c73300..2a49dcc 100644
--- a/tests/itests-azure-storage-queue/src/test/java/org/apache/camel/kafkaconnector/azure/storage/queue/sink/CamelSinkAzureStorageQueueITCase.java
+++ b/tests/itests-azure-storage-queue/src/test/java/org/apache/camel/kafkaconnector/azure/storage/queue/sink/CamelSinkAzureStorageQueueITCase.java
@@ -26,14 +26,14 @@ import com.azure.storage.queue.QueueClient;
 import com.azure.storage.queue.QueueServiceClient;
 import com.azure.storage.queue.models.PeekedMessageItem;
 import org.apache.camel.kafkaconnector.CamelSinkTask;
-import org.apache.camel.kafkaconnector.azure.common.AzureCredentialsHolder;
-import org.apache.camel.kafkaconnector.azure.common.services.AzureService;
 import org.apache.camel.kafkaconnector.azure.storage.services.AzureStorageClientUtils;
-import org.apache.camel.kafkaconnector.azure.storage.services.AzureStorageQueueServiceFactory;
 import org.apache.camel.kafkaconnector.common.AbstractKafkaTest;
 import org.apache.camel.kafkaconnector.common.ConnectorPropertyFactory;
 import org.apache.camel.kafkaconnector.common.clients.kafka.KafkaClient;
 import org.apache.camel.kafkaconnector.common.utils.TestUtils;
+import org.apache.camel.test.infra.azure.common.AzureCredentialsHolder;
+import org.apache.camel.test.infra.azure.common.services.AzureService;
+import org.apache.camel.test.infra.azure.storage.queue.services.AzureStorageQueueServiceFactory;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
diff --git a/tests/itests-azure-storage-queue/src/test/java/org/apache/camel/kafkaconnector/azure/storage/services/AzureStorageClientUtils.java b/tests/itests-azure-storage-queue/src/test/java/org/apache/camel/kafkaconnector/azure/storage/services/AzureStorageClientUtils.java
index f5cb089..5d69064 100644
--- a/tests/itests-azure-storage-queue/src/test/java/org/apache/camel/kafkaconnector/azure/storage/services/AzureStorageClientUtils.java
+++ b/tests/itests-azure-storage-queue/src/test/java/org/apache/camel/kafkaconnector/azure/storage/services/AzureStorageClientUtils.java
@@ -23,8 +23,9 @@ import com.azure.storage.common.StorageSharedKeyCredential;
 import com.azure.storage.queue.QueueServiceClient;
 import com.azure.storage.queue.QueueServiceClientBuilder;
 import com.azure.storage.queue.QueueServiceVersion;
-import org.apache.camel.kafkaconnector.azure.common.AzureConfigs;
+import org.apache.camel.test.infra.azure.common.AzureConfigs;
 
+@Deprecated
 public final class AzureStorageClientUtils {
 
     private AzureStorageClientUtils() {
diff --git a/tests/itests-azure-storage-queue/src/test/java/org/apache/camel/kafkaconnector/azure/storage/services/AzureStorageQueueLocalContainerService.java b/tests/itests-azure-storage-queue/src/test/java/org/apache/camel/kafkaconnector/azure/storage/services/AzureStorageQueueLocalContainerService.java
deleted file mode 100644
index d5323d2..0000000
--- a/tests/itests-azure-storage-queue/src/test/java/org/apache/camel/kafkaconnector/azure/storage/services/AzureStorageQueueLocalContainerService.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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.kafkaconnector.azure.storage.services;
-
-import org.apache.camel.kafkaconnector.azure.common.AzureConfigs;
-import org.apache.camel.kafkaconnector.azure.common.AzureCredentialsHolder;
-import org.apache.camel.kafkaconnector.azure.common.services.AzureServices;
-import org.apache.camel.kafkaconnector.azure.common.services.AzureStorageService;
-
-public class AzureStorageQueueLocalContainerService extends AzureStorageService {
-
-    @Override
-    public void initialize() {
-        super.initialize();
-
-        System.setProperty(AzureConfigs.ACCOUNT_NAME, getContainer().azureCredentials().accountName());
-        System.setProperty(AzureConfigs.ACCOUNT_KEY, getContainer().azureCredentials().accountKey());
-        System.setProperty(AzureConfigs.HOST, getContainer().getContainerIpAddress());
-        System.setProperty(AzureConfigs.PORT, String.valueOf(getContainer().getMappedPort(AzureServices.QUEUE_SERVICE)));
-    }
-
-    @Override
-    public AzureCredentialsHolder azureCredentials() {
-        return getContainer().azureCredentials();
-    }
-}
diff --git a/tests/itests-azure-storage-queue/src/test/java/org/apache/camel/kafkaconnector/azure/storage/services/AzureStorageQueueRemoteService.java b/tests/itests-azure-storage-queue/src/test/java/org/apache/camel/kafkaconnector/azure/storage/services/AzureStorageQueueRemoteService.java
deleted file mode 100644
index 60e79f0..0000000
--- a/tests/itests-azure-storage-queue/src/test/java/org/apache/camel/kafkaconnector/azure/storage/services/AzureStorageQueueRemoteService.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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.kafkaconnector.azure.storage.services;
-
-import org.apache.camel.kafkaconnector.azure.common.AzureConfigs;
-import org.apache.camel.kafkaconnector.azure.common.AzureCredentialsHolder;
-import org.apache.camel.kafkaconnector.azure.common.services.AzureService;
-
-public class AzureStorageQueueRemoteService implements AzureService {
-
-    @Override
-    public void initialize() {
-        // NO-OP
-    }
-
-    @Override
-    public void shutdown() {
-        // NO-OP
-    }
-
-    @Override
-    public AzureCredentialsHolder azureCredentials() {
-        // Default credentials for Azurite
-        return new AzureCredentialsHolder() {
-            @Override
-            public String accountName() {
-                return System.getProperty(AzureConfigs.ACCOUNT_NAME);
-            }
-
-            @Override
-            public String accountKey() {
-                return System.getProperty(AzureConfigs.ACCOUNT_KEY);
-            }
-        };
-    }
-}
diff --git a/tests/itests-azure-storage-queue/src/test/java/org/apache/camel/kafkaconnector/azure/storage/services/AzureStorageQueueServiceFactory.java b/tests/itests-azure-storage-queue/src/test/java/org/apache/camel/kafkaconnector/azure/storage/services/AzureStorageQueueServiceFactory.java
deleted file mode 100644
index 71c15d6..0000000
--- a/tests/itests-azure-storage-queue/src/test/java/org/apache/camel/kafkaconnector/azure/storage/services/AzureStorageQueueServiceFactory.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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.kafkaconnector.azure.storage.services;
-
-import org.apache.camel.kafkaconnector.azure.common.services.AzureService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public final class AzureStorageQueueServiceFactory {
-    private static final Logger LOG = LoggerFactory.getLogger(AzureStorageQueueServiceFactory.class);
-
-    private AzureStorageQueueServiceFactory() {
-
-    }
-
-    public static AzureService createAzureService() {
-        String instanceType = System.getProperty("azure.instance.type");
-
-        if (instanceType == null || instanceType.equals("local-azure-container")) {
-            return new AzureStorageQueueLocalContainerService();
-        }
-
-        if (instanceType.equals("remote")) {
-            return new AzureStorageQueueRemoteService();
-        }
-
-        LOG.error("Azure instance must be one of 'local-azure-container' or 'remote");
-        throw new UnsupportedOperationException(String.format("Invalid Azure instance type: %s", instanceType));
-    }
-}


[camel-kafka-connector] 03/03: Removed the outdated Azure common module as it's not required for the Azure tests

Posted by or...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-kafka-connector.git

commit b03b70c2447ad9b8317d6d7e0b76a8b324d7a687
Author: Otavio Rodolfo Piske <op...@redhat.com>
AuthorDate: Wed Jan 13 09:03:12 2021 +0100

    Removed the outdated Azure common module as it's not required for the Azure tests
---
 tests/itests-azure-common/pom.xml                  | 59 ----------------------
 .../kafkaconnector/azure/common/AzureConfigs.java  | 29 -----------
 .../azure/common/AzureCredentialsHolder.java       | 23 ---------
 .../azure/common/services/AzureService.java        | 54 --------------------
 .../azure/common/services/AzureServices.java       | 26 ----------
 .../azure/common/services/AzureStorageService.java | 47 -----------------
 .../azure/common/services/AzuriteContainer.java    | 56 --------------------
 tests/pom.xml                                      |  1 -
 8 files changed, 295 deletions(-)

diff --git a/tests/itests-azure-common/pom.xml b/tests/itests-azure-common/pom.xml
deleted file mode 100644
index 9a12b22..0000000
--- a/tests/itests-azure-common/pom.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?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">
-    <parent>
-        <groupId>org.apache.camel.kafkaconnector</groupId>
-        <artifactId>itests-parent</artifactId>
-        <version>0.8.0-SNAPSHOT</version>
-        <relativePath>../itests-parent/pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>itests-azure-common</artifactId>
-    <name>Camel-Kafka-Connector :: Tests :: Azure Common</name>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.camel.kafkaconnector</groupId>
-            <artifactId>itests-common</artifactId>
-            <version>${project.version}</version>
-            <type>test-jar</type>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <phase>test-compile</phase>
-                        <goals>
-                            <goal>test-jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-
-
-</project>
\ No newline at end of file
diff --git a/tests/itests-azure-common/src/test/java/org/apache/camel/kafkaconnector/azure/common/AzureConfigs.java b/tests/itests-azure-common/src/test/java/org/apache/camel/kafkaconnector/azure/common/AzureConfigs.java
deleted file mode 100644
index b90bf80..0000000
--- a/tests/itests-azure-common/src/test/java/org/apache/camel/kafkaconnector/azure/common/AzureConfigs.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * 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.kafkaconnector.azure.common;
-
-public final class AzureConfigs {
-    public static final String HOST = "azure.storage.host";
-    public static final String PORT = "azure.storage.port";
-    public static final String ACCOUNT_NAME = "azure.storage.account.name";
-    public static final String ACCOUNT_KEY = "azure.storage.account.key";
-
-    private AzureConfigs() {
-
-    }
-}
diff --git a/tests/itests-azure-common/src/test/java/org/apache/camel/kafkaconnector/azure/common/AzureCredentialsHolder.java b/tests/itests-azure-common/src/test/java/org/apache/camel/kafkaconnector/azure/common/AzureCredentialsHolder.java
deleted file mode 100644
index 7d337b5..0000000
--- a/tests/itests-azure-common/src/test/java/org/apache/camel/kafkaconnector/azure/common/AzureCredentialsHolder.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * 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.kafkaconnector.azure.common;
-
-public interface AzureCredentialsHolder {
-    String accountName();
-    String accountKey();
-}
diff --git a/tests/itests-azure-common/src/test/java/org/apache/camel/kafkaconnector/azure/common/services/AzureService.java b/tests/itests-azure-common/src/test/java/org/apache/camel/kafkaconnector/azure/common/services/AzureService.java
deleted file mode 100644
index 2baa290..0000000
--- a/tests/itests-azure-common/src/test/java/org/apache/camel/kafkaconnector/azure/common/services/AzureService.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * 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.kafkaconnector.azure.common.services;
-
-import org.apache.camel.kafkaconnector.azure.common.AzureCredentialsHolder;
-import org.junit.jupiter.api.extension.AfterAllCallback;
-import org.junit.jupiter.api.extension.BeforeAllCallback;
-import org.junit.jupiter.api.extension.ExtensionContext;
-
-public interface AzureService extends BeforeAllCallback, AfterAllCallback {
-
-    /**
-     * Gets the credentials for the test service
-     * @return
-     */
-    AzureCredentialsHolder azureCredentials();
-
-
-    /**
-     * Perform any initialization necessary
-     */
-    void initialize();
-
-    /**
-     * Shuts down the service after the test has completed
-     */
-    void shutdown();
-
-
-    @Override
-    default void beforeAll(ExtensionContext extensionContext) throws Exception {
-        initialize();
-    }
-
-    @Override
-    default void afterAll(ExtensionContext extensionContext) throws Exception {
-        shutdown();
-    }
-}
diff --git a/tests/itests-azure-common/src/test/java/org/apache/camel/kafkaconnector/azure/common/services/AzureServices.java b/tests/itests-azure-common/src/test/java/org/apache/camel/kafkaconnector/azure/common/services/AzureServices.java
deleted file mode 100644
index b837215..0000000
--- a/tests/itests-azure-common/src/test/java/org/apache/camel/kafkaconnector/azure/common/services/AzureServices.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * 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.kafkaconnector.azure.common.services;
-
-public final class AzureServices {
-    public static final int BLOB_SERVICE = 10000;
-    public static final int QUEUE_SERVICE = 10001;
-
-    private AzureServices() {
-    }
-}
diff --git a/tests/itests-azure-common/src/test/java/org/apache/camel/kafkaconnector/azure/common/services/AzureStorageService.java b/tests/itests-azure-common/src/test/java/org/apache/camel/kafkaconnector/azure/common/services/AzureStorageService.java
deleted file mode 100644
index 0d2db5e..0000000
--- a/tests/itests-azure-common/src/test/java/org/apache/camel/kafkaconnector/azure/common/services/AzureStorageService.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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.kafkaconnector.azure.common.services;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public abstract class AzureStorageService implements AzureService {
-    private static final Logger LOG = LoggerFactory.getLogger(AzureStorageService.class);
-    private final AzuriteContainer container = new AzuriteContainer();
-
-    public AzureStorageService() {
-        container.start();
-    }
-
-    protected AzuriteContainer getContainer() {
-        return container;
-    }
-
-    @Override
-    public void initialize() {
-        LOG.info("Azurite local blob service running at address {}:{}", container.getHost(),
-                container.getMappedPort(AzureServices.BLOB_SERVICE));
-        LOG.info("Azurite local queue service running at address {}:{}", container.getHost(),
-                container.getMappedPort(AzureServices.QUEUE_SERVICE));
-    }
-
-    @Override
-    public void shutdown() {
-        container.stop();
-    }
-}
diff --git a/tests/itests-azure-common/src/test/java/org/apache/camel/kafkaconnector/azure/common/services/AzuriteContainer.java b/tests/itests-azure-common/src/test/java/org/apache/camel/kafkaconnector/azure/common/services/AzuriteContainer.java
deleted file mode 100644
index 2bba8a7..0000000
--- a/tests/itests-azure-common/src/test/java/org/apache/camel/kafkaconnector/azure/common/services/AzuriteContainer.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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.kafkaconnector.azure.common.services;
-
-import org.apache.camel.kafkaconnector.azure.common.AzureCredentialsHolder;
-import org.testcontainers.containers.GenericContainer;
-import org.testcontainers.containers.wait.strategy.Wait;
-
-public class AzuriteContainer extends GenericContainer<AzuriteContainer> {
-    public static final String DEFAULT_ACCOUNT_NAME = "devstoreaccount1";
-    public static final String DEFAULT_ACCOUNT_KEY = "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==";
-
-    private static final String CONTAINER_NAME = "mcr.microsoft.com/azure-storage/azurite:3.8.0";
-
-    public AzuriteContainer() {
-        this(CONTAINER_NAME);
-    }
-
-    public AzuriteContainer(String containerName) {
-        super(containerName);
-
-        withExposedPorts(AzureServices.BLOB_SERVICE, AzureServices.QUEUE_SERVICE);
-
-        waitingFor(Wait.forListeningPort());
-    }
-
-    public AzureCredentialsHolder azureCredentials() {
-        // Default credentials for Azurite
-        return new AzureCredentialsHolder() {
-            @Override
-            public String accountName() {
-                return DEFAULT_ACCOUNT_NAME;
-            }
-
-            @Override
-            public String accountKey() {
-                return DEFAULT_ACCOUNT_KEY;
-            }
-        };
-    }
-}
diff --git a/tests/pom.xml b/tests/pom.xml
index 2743a2c..e3064e8 100644
--- a/tests/pom.xml
+++ b/tests/pom.xml
@@ -56,7 +56,6 @@
         <module>itests-hdfs</module>
         <module>itests-mongodb</module>
         <module>itests-jdbc</module>
-        <module>itests-azure-common</module>
         <module>itests-azure-storage-blob</module>
         <module>itests-azure-storage-queue</module>
         <module>perf-tests-rabbitmq</module>


[camel-kafka-connector] 01/03: Convert Azure storage blob tests to the new test infra

Posted by or...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-kafka-connector.git

commit b6b73c7f05f63a0a639061c8c4c5fc358ea76f9e
Author: Otavio Rodolfo Piske <op...@redhat.com>
AuthorDate: Wed Jan 13 08:56:06 2021 +0100

    Convert Azure storage blob tests to the new test infra
---
 tests/itests-azure-storage-blob/pom.xml            | 33 +++++++++---
 .../blob/sink/CamelSinkAzureStorageBlobITCase.java |  8 +--
 .../storage/blob/sink/TestBlobConfiguration.java   |  2 +-
 .../services/AzureStorageBlobClientUtils.java      | 63 ----------------------
 .../AzureStorageBlobLocalContainerService.java     | 41 --------------
 .../services/AzureStorageBlobRemoteService.java    | 51 ------------------
 .../services/AzureStorageBlobServiceFactory.java   | 45 ----------------
 7 files changed, 30 insertions(+), 213 deletions(-)

diff --git a/tests/itests-azure-storage-blob/pom.xml b/tests/itests-azure-storage-blob/pom.xml
index 69dccbc..5f145d2 100644
--- a/tests/itests-azure-storage-blob/pom.xml
+++ b/tests/itests-azure-storage-blob/pom.xml
@@ -41,14 +41,6 @@
             <scope>test</scope>
         </dependency>
 
-        <dependency>
-            <groupId>org.apache.camel.kafkaconnector</groupId>
-            <artifactId>itests-azure-common</artifactId>
-            <version>${project.version}</version>
-            <type>test-jar</type>
-            <scope>test</scope>
-        </dependency>
-
         <!--
             NOTE: the only reason we have this one here is because there is a conflict between the
             version of Netty used by the azure client and the one used within Kafka Connect.
@@ -68,6 +60,31 @@
             <artifactId>camel-azure-storage-blob</artifactId>
         </dependency>
 
+        <!-- test infra -->
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-test-infra-common</artifactId>
+            <version>${camel.version}</version>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-test-infra-azure-common</artifactId>
+            <version>${camel.version}</version>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-test-infra-azure-storage-blob</artifactId>
+            <version>${camel.version}</version>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+
     </dependencies>
 
 
diff --git a/tests/itests-azure-storage-blob/src/test/java/org/apache/camel/kafkaconnector/azure/storage/blob/sink/CamelSinkAzureStorageBlobITCase.java b/tests/itests-azure-storage-blob/src/test/java/org/apache/camel/kafkaconnector/azure/storage/blob/sink/CamelSinkAzureStorageBlobITCase.java
index a0452e2..e7e5b81 100644
--- a/tests/itests-azure-storage-blob/src/test/java/org/apache/camel/kafkaconnector/azure/storage/blob/sink/CamelSinkAzureStorageBlobITCase.java
+++ b/tests/itests-azure-storage-blob/src/test/java/org/apache/camel/kafkaconnector/azure/storage/blob/sink/CamelSinkAzureStorageBlobITCase.java
@@ -28,14 +28,14 @@ import com.azure.storage.blob.BlobContainerClient;
 import com.azure.storage.blob.BlobServiceClient;
 import com.azure.storage.blob.models.BlobItem;
 import org.apache.camel.kafkaconnector.CamelSinkTask;
-import org.apache.camel.kafkaconnector.azure.common.AzureCredentialsHolder;
-import org.apache.camel.kafkaconnector.azure.common.services.AzureService;
-import org.apache.camel.kafkaconnector.azure.storage.services.AzureStorageBlobClientUtils;
-import org.apache.camel.kafkaconnector.azure.storage.services.AzureStorageBlobServiceFactory;
 import org.apache.camel.kafkaconnector.common.AbstractKafkaTest;
 import org.apache.camel.kafkaconnector.common.ConnectorPropertyFactory;
 import org.apache.camel.kafkaconnector.common.clients.kafka.KafkaClient;
 import org.apache.camel.kafkaconnector.common.utils.TestUtils;
+import org.apache.camel.test.infra.azure.common.AzureCredentialsHolder;
+import org.apache.camel.test.infra.azure.common.services.AzureService;
+import org.apache.camel.test.infra.azure.storage.blob.clients.AzureStorageBlobClientUtils;
+import org.apache.camel.test.infra.azure.storage.blob.services.AzureStorageBlobServiceFactory;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
diff --git a/tests/itests-azure-storage-blob/src/test/java/org/apache/camel/kafkaconnector/azure/storage/blob/sink/TestBlobConfiguration.java b/tests/itests-azure-storage-blob/src/test/java/org/apache/camel/kafkaconnector/azure/storage/blob/sink/TestBlobConfiguration.java
index 93e1cb8..c0e98dd 100644
--- a/tests/itests-azure-storage-blob/src/test/java/org/apache/camel/kafkaconnector/azure/storage/blob/sink/TestBlobConfiguration.java
+++ b/tests/itests-azure-storage-blob/src/test/java/org/apache/camel/kafkaconnector/azure/storage/blob/sink/TestBlobConfiguration.java
@@ -19,7 +19,7 @@ package org.apache.camel.kafkaconnector.azure.storage.blob.sink;
 
 import com.azure.storage.blob.BlobServiceClient;
 import org.apache.camel.component.azure.storage.blob.BlobConfiguration;
-import org.apache.camel.kafkaconnector.azure.storage.services.AzureStorageBlobClientUtils;
+import org.apache.camel.test.infra.azure.storage.blob.clients.AzureStorageBlobClientUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/tests/itests-azure-storage-blob/src/test/java/org/apache/camel/kafkaconnector/azure/storage/services/AzureStorageBlobClientUtils.java b/tests/itests-azure-storage-blob/src/test/java/org/apache/camel/kafkaconnector/azure/storage/services/AzureStorageBlobClientUtils.java
deleted file mode 100644
index 82f45a1..0000000
--- a/tests/itests-azure-storage-blob/src/test/java/org/apache/camel/kafkaconnector/azure/storage/services/AzureStorageBlobClientUtils.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * 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.kafkaconnector.azure.storage.services;
-
-import com.azure.core.http.policy.HttpLogDetailLevel;
-import com.azure.core.http.policy.HttpLogOptions;
-import com.azure.storage.blob.BlobServiceClient;
-import com.azure.storage.blob.BlobServiceClientBuilder;
-import com.azure.storage.blob.BlobServiceVersion;
-import com.azure.storage.common.StorageSharedKeyCredential;
-import org.apache.camel.kafkaconnector.azure.common.AzureConfigs;
-
-public final class AzureStorageBlobClientUtils {
-
-    private AzureStorageBlobClientUtils() {
-
-    }
-
-    public static BlobServiceClient getClient() {
-        String instanceType = System.getProperty("azure.instance.type");
-
-        String accountName = System.getProperty(AzureConfigs.ACCOUNT_NAME);
-        String accountKey = System.getProperty(AzureConfigs.ACCOUNT_KEY);
-        StorageSharedKeyCredential credential = new StorageSharedKeyCredential(accountName, accountKey);
-
-        String host = System.getProperty(AzureConfigs.HOST);
-        String port = System.getProperty(AzureConfigs.PORT);
-
-        String endpoint;
-
-        if (instanceType == null || instanceType.equals("local-azure-container")) {
-            endpoint = String.format("http://%s:%s/%s", host, port, accountName);
-        } else {
-            if (host == null || host.isEmpty()) {
-                endpoint = String.format("https://%s.blob.core.windows.net/%s", accountName, accountKey);
-            } else {
-                endpoint = String.format("http://%s:%s/%s", host, port, accountName);
-            }
-        }
-
-        return new BlobServiceClientBuilder()
-                .endpoint(endpoint)
-                .credential(credential)
-                .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS).setPrettyPrintBody(true))
-                .serviceVersion(BlobServiceVersion.V2019_12_12)
-                .buildClient();
-    }
-}
diff --git a/tests/itests-azure-storage-blob/src/test/java/org/apache/camel/kafkaconnector/azure/storage/services/AzureStorageBlobLocalContainerService.java b/tests/itests-azure-storage-blob/src/test/java/org/apache/camel/kafkaconnector/azure/storage/services/AzureStorageBlobLocalContainerService.java
deleted file mode 100644
index 09285ab..0000000
--- a/tests/itests-azure-storage-blob/src/test/java/org/apache/camel/kafkaconnector/azure/storage/services/AzureStorageBlobLocalContainerService.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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.kafkaconnector.azure.storage.services;
-
-import org.apache.camel.kafkaconnector.azure.common.AzureConfigs;
-import org.apache.camel.kafkaconnector.azure.common.AzureCredentialsHolder;
-import org.apache.camel.kafkaconnector.azure.common.services.AzureServices;
-import org.apache.camel.kafkaconnector.azure.common.services.AzureStorageService;
-
-public class AzureStorageBlobLocalContainerService extends AzureStorageService {
-
-    @Override
-    public void initialize() {
-        super.initialize();
-
-        System.setProperty(AzureConfigs.ACCOUNT_NAME, getContainer().azureCredentials().accountName());
-        System.setProperty(AzureConfigs.ACCOUNT_KEY, getContainer().azureCredentials().accountKey());
-        System.setProperty(AzureConfigs.HOST, getContainer().getContainerIpAddress());
-        System.setProperty(AzureConfigs.PORT, String.valueOf(getContainer().getMappedPort(AzureServices.BLOB_SERVICE)));
-    }
-
-    @Override
-    public AzureCredentialsHolder azureCredentials() {
-        return getContainer().azureCredentials();
-    }
-}
diff --git a/tests/itests-azure-storage-blob/src/test/java/org/apache/camel/kafkaconnector/azure/storage/services/AzureStorageBlobRemoteService.java b/tests/itests-azure-storage-blob/src/test/java/org/apache/camel/kafkaconnector/azure/storage/services/AzureStorageBlobRemoteService.java
deleted file mode 100644
index aee525c..0000000
--- a/tests/itests-azure-storage-blob/src/test/java/org/apache/camel/kafkaconnector/azure/storage/services/AzureStorageBlobRemoteService.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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.kafkaconnector.azure.storage.services;
-
-import org.apache.camel.kafkaconnector.azure.common.AzureConfigs;
-import org.apache.camel.kafkaconnector.azure.common.AzureCredentialsHolder;
-import org.apache.camel.kafkaconnector.azure.common.services.AzureService;
-
-public class AzureStorageBlobRemoteService implements AzureService {
-
-    @Override
-    public void initialize() {
-        // NO-OP
-    }
-
-    @Override
-    public void shutdown() {
-        // NO-OP
-    }
-
-    @Override
-    public AzureCredentialsHolder azureCredentials() {
-        // Default credentials for Azurite
-        return new AzureCredentialsHolder() {
-            @Override
-            public String accountName() {
-                return System.getProperty(AzureConfigs.ACCOUNT_NAME);
-            }
-
-            @Override
-            public String accountKey() {
-                return System.getProperty(AzureConfigs.ACCOUNT_KEY);
-            }
-        };
-    }
-}
diff --git a/tests/itests-azure-storage-blob/src/test/java/org/apache/camel/kafkaconnector/azure/storage/services/AzureStorageBlobServiceFactory.java b/tests/itests-azure-storage-blob/src/test/java/org/apache/camel/kafkaconnector/azure/storage/services/AzureStorageBlobServiceFactory.java
deleted file mode 100644
index d55774a..0000000
--- a/tests/itests-azure-storage-blob/src/test/java/org/apache/camel/kafkaconnector/azure/storage/services/AzureStorageBlobServiceFactory.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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.kafkaconnector.azure.storage.services;
-
-import org.apache.camel.kafkaconnector.azure.common.services.AzureService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public final class AzureStorageBlobServiceFactory {
-    private static final Logger LOG = LoggerFactory.getLogger(AzureStorageBlobServiceFactory.class);
-
-    private AzureStorageBlobServiceFactory() {
-
-    }
-
-    public static AzureService createAzureService() {
-        String instanceType = System.getProperty("azure.instance.type");
-
-        if (instanceType == null || instanceType.equals("local-azure-container")) {
-            return new AzureStorageBlobLocalContainerService();
-        }
-
-        if (instanceType.equals("remote")) {
-            return new AzureStorageBlobRemoteService();
-        }
-
-        LOG.error("Azure instance must be one of 'local-azure-container' or 'remote");
-        throw new UnsupportedOperationException(String.format("Invalid Azure instance type: %s", instanceType));
-    }
-}