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.git
The following commit(s) were added to refs/heads/master by this push:
new 7774d3c CAMEL-16400: split unit and integration tests for
camel-google-drive (#5388)
7774d3c is described below
commit 7774d3c4a2678e330aeaaf250bdfd063b73af245
Author: Otavio Rodolfo Piske <[email protected]>
AuthorDate: Fri Apr 16 12:50:52 2021 +0200
CAMEL-16400: split unit and integration tests for camel-google-drive (#5388)
---
components/camel-google/camel-google-drive/pom.xml | 38 ++++----------
.../drive/AbstractGoogleDriveTestSupport.java | 58 ++++++++++++++--------
.../DriveAboutIT.java} | 10 ++--
.../DriveAppsIT.java} | 10 ++--
.../DriveChangesIT.java} | 10 ++--
.../DriveChildrenIT.java} | 10 ++--
.../DriveCommentsIT.java} | 10 ++--
.../DriveFilesIT.java} | 10 ++--
.../DrivePermissionsIT.java} | 10 ++--
.../DrivePropertiesIT.java} | 10 ++--
.../DriveRepliesIT.java} | 10 ++--
.../DriveRevisionsIT.java} | 10 ++--
.../FileConverterIT.java} | 10 ++--
.../FilesConsumerIT.java} | 10 ++--
14 files changed, 132 insertions(+), 84 deletions(-)
diff --git a/components/camel-google/camel-google-drive/pom.xml
b/components/camel-google/camel-google-drive/pom.xml
index 89f1613..f785e21 100644
--- a/components/camel-google/camel-google-drive/pom.xml
+++ b/components/camel-google/camel-google-drive/pom.xml
@@ -204,6 +204,17 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <configuration>
+ <childDelegation>false</childDelegation>
+ <useFile>true</useFile>
+ <forkCount>1</forkCount>
+ <reuseForks>true</reuseForks>
+
<forkedProcessTimeoutInSeconds>300</forkedProcessTimeoutInSeconds>
+ </configuration>
+ </plugin>
</plugins>
<pluginManagement>
@@ -223,31 +234,4 @@
</pluginManagement>
</build>
-
- <profiles>
- <profile>
- <id>google-drive-test</id>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <childDelegation>false</childDelegation>
- <useFile>true</useFile>
- <forkCount>1</forkCount>
- <reuseForks>true</reuseForks>
-
<forkedProcessTimeoutInSeconds>300</forkedProcessTimeoutInSeconds>
- <excludes>
- <exclude>**/*XXXTest.java</exclude>
- </excludes>
- <includes>
- <include>**/*Test.java</include>
- </includes>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
</project>
diff --git
a/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/AbstractGoogleDriveTestSupport.java
b/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/AbstractGoogleDriveTestSupport.java
index 5fa63fd..f2013fd 100644
---
a/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/AbstractGoogleDriveTestSupport.java
+++
b/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/AbstractGoogleDriveTestSupport.java
@@ -52,6 +52,42 @@ public abstract class AbstractGoogleDriveTestSupport extends
CamelTestSupport {
private static final String TEST_OPTIONS_PROPERTIES =
"/test-options.properties";
private static final String REFRESH_TOKEN_PROPERTY = "refreshToken";
+ // Used by JUnit to dynamically execute integration tests if credentials
are provided
+ @SuppressWarnings("unused")
+ private static boolean hasCredentials() {
+ Properties properties = loadProperties();
+
+ return !properties.getProperty("clientId", "").isEmpty()
+ && !properties.getProperty("clientSecret").isEmpty();
+ }
+
+ private static Properties loadProperties() {
+ final InputStream in =
AbstractGoogleDriveTestSupport.class.getResourceAsStream(TEST_OPTIONS_PROPERTIES);
+ if (in == null) {
+ throw new RuntimeException(TEST_OPTIONS_PROPERTIES + " could not
be found");
+ }
+
+ final StringBuilder builder = new StringBuilder();
+
+ try (final BufferedReader reader = new BufferedReader(new
InputStreamReader(in, "UTF-8"))) {
+ String line;
+ while ((line = reader.readLine()) != null) {
+ builder.append(line).append(System.lineSeparator());
+ }
+ propertyText = builder.toString();
+
+ final Properties properties = new Properties();
+
+ properties.load(new StringReader(propertyText));
+
+ return properties;
+ } catch (IOException e) {
+ throw new RuntimeException(
+ String.format("%s could not be loaded: %s",
TEST_OPTIONS_PROPERTIES, e.getMessage()),
+ e);
+ }
+ }
+
protected File uploadTestFile() {
File fileMetadata = new File();
fileMetadata.setTitle(UPLOAD_FILE.getName());
@@ -80,27 +116,7 @@ public abstract class AbstractGoogleDriveTestSupport
extends CamelTestSupport {
protected CamelContext createCamelContext() throws Exception {
final CamelContext context = super.createCamelContext();
- final InputStream in =
getClass().getResourceAsStream(TEST_OPTIONS_PROPERTIES);
- if (in == null) {
- throw new IOException(TEST_OPTIONS_PROPERTIES + " could not be
found");
- }
-
- final StringBuilder builder = new StringBuilder();
- final BufferedReader reader = new BufferedReader(new
InputStreamReader(in, "UTF-8"));
- String line;
- while ((line = reader.readLine()) != null) {
- builder.append(line).append(System.lineSeparator());
- }
- propertyText = builder.toString();
-
- final Properties properties = new Properties();
- try {
- properties.load(new StringReader(propertyText));
- } catch (IOException e) {
- throw new IOException(
- String.format("%s could not be loaded: %s",
TEST_OPTIONS_PROPERTIES, e.getMessage()),
- e);
- }
+ final Properties properties = loadProperties();
//
// // cache test properties
// refreshToken =
properties.getProperty(REFRESH_TOKEN_PROPERTY);
diff --git
a/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveAboutIntegrationTest.java
b/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/integration/DriveAboutIT.java
similarity index 81%
rename from
components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveAboutIntegrationTest.java
rename to
components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/integration/DriveAboutIT.java
index 353c684..db731f3 100644
---
a/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveAboutIntegrationTest.java
+++
b/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/integration/DriveAboutIT.java
@@ -14,12 +14,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.google.drive;
+package org.apache.camel.component.google.drive.integration;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.google.drive.AbstractGoogleDriveTestSupport;
import org.apache.camel.component.google.drive.internal.DriveAboutApiMethod;
import
org.apache.camel.component.google.drive.internal.GoogleDriveApiCollection;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.EnabledIf;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -28,9 +30,11 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
/**
* Test class for com.google.api.services.drive.Drive$About APIs.
*/
-public class DriveAboutIntegrationTest extends AbstractGoogleDriveTestSupport {
+@EnabledIf(value =
"org.apache.camel.component.google.drive.AbstractGoogleDriveTestSupport#hasCredentials",
+ disabledReason = "Google Drive credentials were not provided")
+public class DriveAboutIT extends AbstractGoogleDriveTestSupport {
- private static final Logger LOG =
LoggerFactory.getLogger(DriveAboutIntegrationTest.class);
+ private static final Logger LOG =
LoggerFactory.getLogger(DriveAboutIT.class);
private static final String PATH_PREFIX
=
GoogleDriveApiCollection.getCollection().getApiName(DriveAboutApiMethod.class).getName();
diff --git
a/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveAppsIntegrationTest.java
b/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/integration/DriveAppsIT.java
similarity index 83%
rename from
components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveAppsIntegrationTest.java
rename to
components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/integration/DriveAppsIT.java
index 5b7f675..6ec5726 100644
---
a/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveAppsIntegrationTest.java
+++
b/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/integration/DriveAppsIT.java
@@ -14,13 +14,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.google.drive;
+package org.apache.camel.component.google.drive.integration;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.google.drive.AbstractGoogleDriveTestSupport;
import org.apache.camel.component.google.drive.internal.DriveAppsApiMethod;
import
org.apache.camel.component.google.drive.internal.GoogleDriveApiCollection;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.EnabledIf;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -29,9 +31,11 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
/**
* Test class for com.google.api.services.drive.Drive$Apps APIs.
*/
-public class DriveAppsIntegrationTest extends AbstractGoogleDriveTestSupport {
+@EnabledIf(value =
"org.apache.camel.component.google.drive.AbstractGoogleDriveTestSupport#hasCredentials",
+ disabledReason = "Google Drive credentials were not provided")
+public class DriveAppsIT extends AbstractGoogleDriveTestSupport {
- private static final Logger LOG =
LoggerFactory.getLogger(DriveAppsIntegrationTest.class);
+ private static final Logger LOG =
LoggerFactory.getLogger(DriveAppsIT.class);
private static final String PATH_PREFIX
=
GoogleDriveApiCollection.getCollection().getApiName(DriveAppsApiMethod.class).getName();
diff --git
a/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveChangesIntegrationTest.java
b/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/integration/DriveChangesIT.java
similarity index 87%
rename from
components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveChangesIntegrationTest.java
rename to
components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/integration/DriveChangesIT.java
index 9b5423c..f8380c9 100644
---
a/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveChangesIntegrationTest.java
+++
b/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/integration/DriveChangesIT.java
@@ -14,15 +14,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.google.drive;
+package org.apache.camel.component.google.drive.integration;
import java.util.List;
import com.google.api.services.drive.model.Change;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.google.drive.AbstractGoogleDriveTestSupport;
import org.apache.camel.component.google.drive.internal.DriveChangesApiMethod;
import
org.apache.camel.component.google.drive.internal.GoogleDriveApiCollection;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.EnabledIf;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -32,9 +34,11 @@ import static org.junit.jupiter.api.Assumptions.assumeFalse;
/**
* Test class for com.google.api.services.drive.Drive$Changes APIs.
*/
-public class DriveChangesIntegrationTest extends
AbstractGoogleDriveTestSupport {
+@EnabledIf(value =
"org.apache.camel.component.google.drive.AbstractGoogleDriveTestSupport#hasCredentials",
+ disabledReason = "Google Drive credentials were not provided")
+public class DriveChangesIT extends AbstractGoogleDriveTestSupport {
- private static final Logger LOG =
LoggerFactory.getLogger(DriveChangesIntegrationTest.class);
+ private static final Logger LOG =
LoggerFactory.getLogger(DriveChangesIT.class);
private static final String PATH_PREFIX
=
GoogleDriveApiCollection.getCollection().getApiName(DriveChangesApiMethod.class).getName();
diff --git
a/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveChildrenIntegrationTest.java
b/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/integration/DriveChildrenIT.java
similarity index 92%
rename from
components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveChildrenIntegrationTest.java
rename to
components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/integration/DriveChildrenIT.java
index 7beba16..0b4425f 100644
---
a/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveChildrenIntegrationTest.java
+++
b/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/integration/DriveChildrenIT.java
@@ -14,16 +14,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.google.drive;
+package org.apache.camel.component.google.drive.integration;
import java.util.HashMap;
import java.util.Map;
import com.google.api.services.drive.model.File;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.google.drive.AbstractGoogleDriveTestSupport;
import org.apache.camel.component.google.drive.internal.DriveChildrenApiMethod;
import
org.apache.camel.component.google.drive.internal.GoogleDriveApiCollection;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.EnabledIf;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -34,9 +36,11 @@ import static org.junit.jupiter.api.Assertions.fail;
/**
* Test class for {@link com.google.api.services.drive.Drive$Children} APIs.
*/
-public class DriveChildrenIntegrationTest extends
AbstractGoogleDriveTestSupport {
+@EnabledIf(value =
"org.apache.camel.component.google.drive.AbstractGoogleDriveTestSupport#hasCredentials",
+ disabledReason = "Google Drive credentials were not provided")
+public class DriveChildrenIT extends AbstractGoogleDriveTestSupport {
- private static final Logger LOG =
LoggerFactory.getLogger(DriveChildrenIntegrationTest.class);
+ private static final Logger LOG =
LoggerFactory.getLogger(DriveChildrenIT.class);
private static final String PATH_PREFIX
=
GoogleDriveApiCollection.getCollection().getApiName(DriveChildrenApiMethod.class).getName();
private static final String ROOT_FOLDER = "root";
diff --git
a/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveCommentsIntegrationTest.java
b/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/integration/DriveCommentsIT.java
similarity index 92%
rename from
components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveCommentsIntegrationTest.java
rename to
components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/integration/DriveCommentsIT.java
index aca808a..fc48d73 100644
---
a/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveCommentsIntegrationTest.java
+++
b/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/integration/DriveCommentsIT.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.google.drive;
+package org.apache.camel.component.google.drive.integration;
import java.util.HashMap;
import java.util.Map;
@@ -22,10 +22,12 @@ import java.util.Map;
import com.google.api.services.drive.model.Comment;
import com.google.api.services.drive.model.File;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.google.drive.AbstractGoogleDriveTestSupport;
import org.apache.camel.component.google.drive.internal.DriveCommentsApiMethod;
import org.apache.camel.component.google.drive.internal.DriveFilesApiMethod;
import
org.apache.camel.component.google.drive.internal.GoogleDriveApiCollection;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.EnabledIf;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -35,9 +37,11 @@ import static org.junit.jupiter.api.Assertions.fail;
/**
* Test class for com.google.api.services.drive.Drive$Comments APIs.
*/
-public class DriveCommentsIntegrationTest extends
AbstractGoogleDriveTestSupport {
+@EnabledIf(value =
"org.apache.camel.component.google.drive.AbstractGoogleDriveTestSupport#hasCredentials",
+ disabledReason = "Google Drive credentials were not provided")
+public class DriveCommentsIT extends AbstractGoogleDriveTestSupport {
- private static final Logger LOG =
LoggerFactory.getLogger(DriveCommentsIntegrationTest.class);
+ private static final Logger LOG =
LoggerFactory.getLogger(DriveCommentsIT.class);
private static final String PATH_PREFIX
=
GoogleDriveApiCollection.getCollection().getApiName(DriveCommentsApiMethod.class).getName();
diff --git
a/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveFilesIntegrationTest.java
b/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/integration/DriveFilesIT.java
similarity index 96%
rename from
components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveFilesIntegrationTest.java
rename to
components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/integration/DriveFilesIT.java
index 334a6e00..381c0fa 100644
---
a/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveFilesIntegrationTest.java
+++
b/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/integration/DriveFilesIT.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.google.drive;
+package org.apache.camel.component.google.drive.integration;
import java.util.ArrayList;
import java.util.HashMap;
@@ -26,10 +26,12 @@ import com.google.api.client.util.DateTime;
import com.google.api.services.drive.model.File;
import com.google.api.services.drive.model.FileList;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.google.drive.AbstractGoogleDriveTestSupport;
import org.apache.camel.component.google.drive.internal.DriveFilesApiMethod;
import
org.apache.camel.component.google.drive.internal.GoogleDriveApiCollection;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.EnabledIf;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -42,9 +44,11 @@ import static org.junit.jupiter.api.Assertions.fail;
/**
* Test class for com.google.api.services.drive.Drive$Files APIs.
*/
-public class DriveFilesIntegrationTest extends AbstractGoogleDriveTestSupport {
+@EnabledIf(value =
"org.apache.camel.component.google.drive.AbstractGoogleDriveTestSupport#hasCredentials",
+ disabledReason = "Google Drive credentials were not provided")
+public class DriveFilesIT extends AbstractGoogleDriveTestSupport {
- private static final Logger LOG =
LoggerFactory.getLogger(DriveFilesIntegrationTest.class);
+ private static final Logger LOG =
LoggerFactory.getLogger(DriveFilesIT.class);
private static final String PATH_PREFIX
=
GoogleDriveApiCollection.getCollection().getApiName(DriveFilesApiMethod.class).getName();
diff --git
a/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DrivePermissionsIntegrationTest.java
b/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/integration/DrivePermissionsIT.java
similarity index 88%
rename from
components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DrivePermissionsIntegrationTest.java
rename to
components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/integration/DrivePermissionsIT.java
index b1b2f91..18e5d71 100644
---
a/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DrivePermissionsIntegrationTest.java
+++
b/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/integration/DrivePermissionsIT.java
@@ -14,23 +14,27 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.google.drive;
+package org.apache.camel.component.google.drive.integration;
import com.google.api.services.drive.model.File;
import com.google.api.services.drive.model.PermissionList;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.google.drive.AbstractGoogleDriveTestSupport;
import
org.apache.camel.component.google.drive.internal.DrivePermissionsApiMethod;
import
org.apache.camel.component.google.drive.internal.GoogleDriveApiCollection;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.EnabledIf;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Test class for com.google.api.services.drive.Drive$Permissions APIs.
*/
-public class DrivePermissionsIntegrationTest extends
AbstractGoogleDriveTestSupport {
+@EnabledIf(value =
"org.apache.camel.component.google.drive.AbstractGoogleDriveTestSupport#hasCredentials",
+ disabledReason = "Google Drive credentials were not provided")
+public class DrivePermissionsIT extends AbstractGoogleDriveTestSupport {
- private static final Logger LOG =
LoggerFactory.getLogger(DrivePermissionsIntegrationTest.class);
+ private static final Logger LOG =
LoggerFactory.getLogger(DrivePermissionsIT.class);
private static final String PATH_PREFIX
=
GoogleDriveApiCollection.getCollection().getApiName(DrivePermissionsApiMethod.class).getName();
diff --git
a/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DrivePropertiesIntegrationTest.java
b/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/integration/DrivePropertiesIT.java
similarity index 87%
rename from
components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DrivePropertiesIntegrationTest.java
rename to
components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/integration/DrivePropertiesIT.java
index 7f49332..3116dc5 100644
---
a/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DrivePropertiesIntegrationTest.java
+++
b/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/integration/DrivePropertiesIT.java
@@ -14,13 +14,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.google.drive;
+package org.apache.camel.component.google.drive.integration;
import com.google.api.services.drive.model.File;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.google.drive.AbstractGoogleDriveTestSupport;
import
org.apache.camel.component.google.drive.internal.DrivePropertiesApiMethod;
import
org.apache.camel.component.google.drive.internal.GoogleDriveApiCollection;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.EnabledIf;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -29,9 +31,11 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
/**
* Test class for com.google.api.services.drive.Drive$Properties APIs.
*/
-public class DrivePropertiesIntegrationTest extends
AbstractGoogleDriveTestSupport {
+@EnabledIf(value =
"org.apache.camel.component.google.drive.AbstractGoogleDriveTestSupport#hasCredentials",
+ disabledReason = "Google Drive credentials were not provided")
+public class DrivePropertiesIT extends AbstractGoogleDriveTestSupport {
- private static final Logger LOG =
LoggerFactory.getLogger(DrivePropertiesIntegrationTest.class);
+ private static final Logger LOG =
LoggerFactory.getLogger(DrivePropertiesIT.class);
private static final String PATH_PREFIX
=
GoogleDriveApiCollection.getCollection().getApiName(DrivePropertiesApiMethod.class).getName();
diff --git
a/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveRepliesIntegrationTest.java
b/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/integration/DriveRepliesIT.java
similarity index 92%
rename from
components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveRepliesIntegrationTest.java
rename to
components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/integration/DriveRepliesIT.java
index 7005854..0e3ecb6 100644
---
a/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveRepliesIntegrationTest.java
+++
b/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/integration/DriveRepliesIT.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.google.drive;
+package org.apache.camel.component.google.drive.integration;
import java.util.HashMap;
import java.util.Map;
@@ -22,10 +22,12 @@ import java.util.Map;
import com.google.api.services.drive.model.Comment;
import com.google.api.services.drive.model.File;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.google.drive.AbstractGoogleDriveTestSupport;
import org.apache.camel.component.google.drive.internal.DriveFilesApiMethod;
import org.apache.camel.component.google.drive.internal.DriveRepliesApiMethod;
import
org.apache.camel.component.google.drive.internal.GoogleDriveApiCollection;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.EnabledIf;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -34,9 +36,11 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
/**
* Test class for com.google.api.services.drive.Drive$Replies APIs.
*/
-public class DriveRepliesIntegrationTest extends
AbstractGoogleDriveTestSupport {
+@EnabledIf(value =
"org.apache.camel.component.google.drive.AbstractGoogleDriveTestSupport#hasCredentials",
+ disabledReason = "Google Drive credentials were not provided")
+public class DriveRepliesIT extends AbstractGoogleDriveTestSupport {
- private static final Logger LOG =
LoggerFactory.getLogger(DriveRepliesIntegrationTest.class);
+ private static final Logger LOG =
LoggerFactory.getLogger(DriveRepliesIT.class);
private static final String PATH_PREFIX
=
GoogleDriveApiCollection.getCollection().getApiName(DriveRepliesApiMethod.class).getName();
diff --git
a/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveRevisionsIntegrationTest.java
b/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/integration/DriveRevisionsIT.java
similarity index 86%
rename from
components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveRevisionsIntegrationTest.java
rename to
components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/integration/DriveRevisionsIT.java
index 5886439..07bb14d 100644
---
a/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/DriveRevisionsIntegrationTest.java
+++
b/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/integration/DriveRevisionsIT.java
@@ -14,13 +14,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.google.drive;
+package org.apache.camel.component.google.drive.integration;
import com.google.api.services.drive.model.File;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.google.drive.AbstractGoogleDriveTestSupport;
import
org.apache.camel.component.google.drive.internal.DriveRevisionsApiMethod;
import
org.apache.camel.component.google.drive.internal.GoogleDriveApiCollection;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.EnabledIf;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -29,9 +31,11 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
/**
* Test class for com.google.api.services.drive.Drive$Revisions APIs.
*/
-public class DriveRevisionsIntegrationTest extends
AbstractGoogleDriveTestSupport {
+@EnabledIf(value =
"org.apache.camel.component.google.drive.AbstractGoogleDriveTestSupport#hasCredentials",
+ disabledReason = "Google Drive credentials were not provided")
+public class DriveRevisionsIT extends AbstractGoogleDriveTestSupport {
- private static final Logger LOG =
LoggerFactory.getLogger(DriveRevisionsIntegrationTest.class);
+ private static final Logger LOG =
LoggerFactory.getLogger(DriveRevisionsIT.class);
private static final String PATH_PREFIX
=
GoogleDriveApiCollection.getCollection().getApiName(DriveRevisionsApiMethod.class).getName();
diff --git
a/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/FileConverterIntegrationTest.java
b/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/integration/FileConverterIT.java
similarity index 85%
rename from
components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/FileConverterIntegrationTest.java
rename to
components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/integration/FileConverterIT.java
index 53c38b4..21e2567 100644
---
a/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/FileConverterIntegrationTest.java
+++
b/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/integration/FileConverterIT.java
@@ -14,15 +14,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.google.drive;
+package org.apache.camel.component.google.drive.integration;
import com.google.api.services.drive.model.File;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.google.drive.AbstractGoogleDriveTestSupport;
import org.apache.camel.component.google.drive.internal.DriveFilesApiMethod;
import
org.apache.camel.component.google.drive.internal.GoogleDriveApiCollection;
import org.apache.camel.component.mock.MockEndpoint;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.EnabledIf;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -32,9 +34,11 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
/**
* Test class for com.google.api.services.drive.Drive$Files APIs.
*/
-public class FileConverterIntegrationTest extends
AbstractGoogleDriveTestSupport {
+@EnabledIf(value =
"org.apache.camel.component.google.drive.AbstractGoogleDriveTestSupport#hasCredentials",
+ disabledReason = "Google Drive credentials were not provided")
+public class FileConverterIT extends AbstractGoogleDriveTestSupport {
- private static final Logger LOG =
LoggerFactory.getLogger(FileConverterIntegrationTest.class);
+ private static final Logger LOG =
LoggerFactory.getLogger(FileConverterIT.class);
private static final String PATH_PREFIX
=
GoogleDriveApiCollection.getCollection().getApiName(DriveFilesApiMethod.class).getName();
diff --git
a/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/FilesConsumerIntegrationTest.java
b/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/integration/FilesConsumerIT.java
similarity index 84%
rename from
components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/FilesConsumerIntegrationTest.java
rename to
components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/integration/FilesConsumerIT.java
index 61827ab..c973494 100644
---
a/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/FilesConsumerIntegrationTest.java
+++
b/components/camel-google/camel-google-drive/src/test/java/org/apache/camel/component/google/drive/integration/FilesConsumerIT.java
@@ -14,15 +14,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.google.drive;
+package org.apache.camel.component.google.drive.integration;
import com.google.api.services.drive.model.File;
import com.google.api.services.drive.model.FileList;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.google.drive.AbstractGoogleDriveTestSupport;
import org.apache.camel.component.google.drive.internal.DriveFilesApiMethod;
import
org.apache.camel.component.google.drive.internal.GoogleDriveApiCollection;
import org.apache.camel.component.mock.MockEndpoint;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.EnabledIf;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -31,9 +33,11 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
/**
* Test class for com.google.api.services.drive.Drive$Files APIs.
*/
-public class FilesConsumerIntegrationTest extends
AbstractGoogleDriveTestSupport {
+@EnabledIf(value =
"org.apache.camel.component.google.drive.AbstractGoogleDriveTestSupport#hasCredentials",
+ disabledReason = "Google Drive credentials were not provided")
+public class FilesConsumerIT extends AbstractGoogleDriveTestSupport {
- private static final Logger LOG =
LoggerFactory.getLogger(FilesConsumerIntegrationTest.class);
+ private static final Logger LOG =
LoggerFactory.getLogger(FilesConsumerIT.class);
private static final String PATH_PREFIX
=
GoogleDriveApiCollection.getCollection().getApiName(DriveFilesApiMethod.class).getName();