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/04/19 11:35:36 UTC
[camel] branch master updated: CAMEL-16400: adjust manual
integration tests for camel-box (#5411)
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 d1a9ede CAMEL-16400: adjust manual integration tests for camel-box (#5411)
d1a9ede is described below
commit d1a9edecae342dd7a93c86551744b4a1794e9cab
Author: Otavio Rodolfo Piske <or...@users.noreply.github.com>
AuthorDate: Mon Apr 19 13:34:40 2021 +0200
CAMEL-16400: adjust manual integration tests for camel-box (#5411)
---
components/camel-box/camel-box-component/pom.xml | 31 +++-------------------
...xTestSupport.java => AbstractBoxITSupport.java} | 30 ++++++++++++++-------
...onTest.java => BoxCollaborationsManagerIT.java} | 7 +++--
...egrationTest.java => BoxCommentsManagerIT.java} | 7 +++--
...grationTest.java => BoxEventLogsManagerIT.java} | 7 +++--
...ntegrationTest.java => BoxEventsManagerIT.java} | 7 +++--
...IntegrationTest.java => BoxFilesManagerIT.java} | 7 +++--
...tegrationTest.java => BoxFoldersManagerIT.java} | 13 +++++----
...ntegrationTest.java => BoxGroupsManagerIT.java} | 7 +++--
...ntegrationTest.java => BoxSearchManagerIT.java} | 7 +++--
...IntegrationTest.java => BoxTasksManagerIT.java} | 7 +++--
...IntegrationTest.java => BoxUsersManagerIT.java} | 7 +++--
12 files changed, 77 insertions(+), 60 deletions(-)
diff --git a/components/camel-box/camel-box-component/pom.xml b/components/camel-box/camel-box-component/pom.xml
index f23625e..534503d 100644
--- a/components/camel-box/camel-box-component/pom.xml
+++ b/components/camel-box/camel-box-component/pom.xml
@@ -587,7 +587,10 @@
</execution>
</executions>
</plugin>
-
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ </plugin>
</plugins>
<pluginManagement>
@@ -608,30 +611,4 @@
</build>
- <profiles>
- <profile>
- <id>integration</id>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <forkedProcessTimeoutInSeconds>300</forkedProcessTimeoutInSeconds>
- <childDelegation>false</childDelegation>
- <useFile>true</useFile>
- <failIfNoTests>false</failIfNoTests>
- <runOrder>alphabetical</runOrder>
- <includes>
- <include>**/*IntegrationTest.java</include>
- </includes>
- <excludes>
- <exclude>**/*XXXTest.java</exclude>
- </excludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
</project>
diff --git a/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/AbstractBoxTestSupport.java b/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/AbstractBoxITSupport.java
similarity index 86%
rename from components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/AbstractBoxTestSupport.java
rename to components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/AbstractBoxITSupport.java
index 71ae355..ee59d5f 100644
--- a/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/AbstractBoxTestSupport.java
+++ b/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/AbstractBoxITSupport.java
@@ -16,7 +16,6 @@
*/
package org.apache.camel.component.box;
-import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
@@ -33,29 +32,40 @@ import org.junit.jupiter.api.TestInstance;
* Abstract base class for Box Integration tests generated by Camel API component maven plugin.
*/
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
-public class AbstractBoxTestSupport extends CamelTestSupport {
+public class AbstractBoxITSupport extends CamelTestSupport {
private static final String TEST_OPTIONS_PROPERTIES = "/test-options.properties";
+ private static Properties properties = new Properties();
protected BoxFolder testFolder;
protected BoxFile testFile;
protected boolean jwtAuthentication;
protected Map<String, Object> options;
- @Override
- protected CamelContext createCamelContext() throws Exception {
-
- final CamelContext context = super.createCamelContext();
-
+ private static void loadProperties() {
// read Box component configuration from TEST_OPTIONS_PROPERTIES
- final Properties properties = new Properties();
try {
- properties.load(getClass().getResourceAsStream(TEST_OPTIONS_PROPERTIES));
+ properties.load(AbstractBoxITSupport.class.getResourceAsStream(TEST_OPTIONS_PROPERTIES));
} catch (Exception e) {
- throw new IOException(
+ throw new RuntimeException(
String.format("%s could not be loaded: %s", TEST_OPTIONS_PROPERTIES, e.getMessage()),
e);
}
+ }
+
+ private static boolean hasCredentials() {
+ if (properties.isEmpty()) {
+ loadProperties();
+ }
+
+ return !properties.getProperty("userName", "").isEmpty()
+ && !properties.getProperty("userPassword", "").isEmpty();
+ }
+
+ @Override
+ protected CamelContext createCamelContext() throws Exception {
+
+ final CamelContext context = super.createCamelContext();
options = new HashMap<>();
for (Map.Entry<Object, Object> entry : properties.entrySet()) {
diff --git a/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxCollaborationsManagerIntegrationTest.java b/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxCollaborationsManagerIT.java
similarity index 96%
rename from components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxCollaborationsManagerIntegrationTest.java
rename to components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxCollaborationsManagerIT.java
index 9abf470..9413b10 100644
--- a/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxCollaborationsManagerIntegrationTest.java
+++ b/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxCollaborationsManagerIT.java
@@ -34,6 +34,7 @@ import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
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;
@@ -43,9 +44,11 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
/**
* Test class for {@link BoxCollaborationsManager} APIs.
*/
-public class BoxCollaborationsManagerIntegrationTest extends AbstractBoxTestSupport {
+@EnabledIf(value = "org.apache.camel.component.box.AbstractBoxITSupport#hasCredentials",
+ disabledReason = "Box credentials were not provided")
+public class BoxCollaborationsManagerIT extends AbstractBoxITSupport {
- private static final Logger LOG = LoggerFactory.getLogger(BoxCollaborationsManagerIntegrationTest.class);
+ private static final Logger LOG = LoggerFactory.getLogger(BoxCollaborationsManagerIT.class);
private static final String PATH_PREFIX = BoxApiCollection.getCollection()
.getApiName(BoxCollaborationsManagerApiMethod.class).getName();
private static final String CAMEL_TEST_FOLDER = "CamelTestFolder";
diff --git a/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxCommentsManagerIntegrationTest.java b/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxCommentsManagerIT.java
similarity index 96%
rename from components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxCommentsManagerIntegrationTest.java
rename to components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxCommentsManagerIT.java
index 27999da..0089292 100644
--- a/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxCommentsManagerIntegrationTest.java
+++ b/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxCommentsManagerIT.java
@@ -32,6 +32,7 @@ import org.apache.camel.component.box.internal.BoxCommentsManagerApiMethod;
import org.junit.jupiter.api.AfterEach;
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;
@@ -42,9 +43,11 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
/**
* Test class for {@link BoxCommentsManager} APIs.
*/
-public class BoxCommentsManagerIntegrationTest extends AbstractBoxTestSupport {
+@EnabledIf(value = "org.apache.camel.component.box.AbstractBoxITSupport#hasCredentials",
+ disabledReason = "Box credentials were not provided")
+public class BoxCommentsManagerIT extends AbstractBoxITSupport {
- private static final Logger LOG = LoggerFactory.getLogger(BoxCommentsManagerIntegrationTest.class);
+ private static final Logger LOG = LoggerFactory.getLogger(BoxCommentsManagerIT.class);
private static final String PATH_PREFIX = BoxApiCollection.getCollection()
.getApiName(BoxCommentsManagerApiMethod.class).getName();
private static final String CAMEL_TEST_FILE = "/CamelTestFile.txt";
diff --git a/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxEventLogsManagerIntegrationTest.java b/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxEventLogsManagerIT.java
similarity index 91%
rename from components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxEventLogsManagerIntegrationTest.java
rename to components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxEventLogsManagerIT.java
index f04b343..4e383ed 100644
--- a/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxEventLogsManagerIntegrationTest.java
+++ b/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxEventLogsManagerIT.java
@@ -26,6 +26,7 @@ import org.apache.camel.component.box.internal.BoxApiCollection;
import org.apache.camel.component.box.internal.BoxEventLogsManagerApiMethod;
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;
@@ -34,9 +35,11 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
/**
* Test class for {@link BoxEventLogsManager} APIs.
*/
-public class BoxEventLogsManagerIntegrationTest extends AbstractBoxTestSupport {
+@EnabledIf(value = "org.apache.camel.component.box.AbstractBoxITSupport#hasCredentials",
+ disabledReason = "Box credentials were not provided")
+public class BoxEventLogsManagerIT extends AbstractBoxITSupport {
- private static final Logger LOG = LoggerFactory.getLogger(BoxEventLogsManagerIntegrationTest.class);
+ private static final Logger LOG = LoggerFactory.getLogger(BoxEventLogsManagerIT.class);
private static final String PATH_PREFIX = BoxApiCollection.getCollection()
.getApiName(BoxEventLogsManagerApiMethod.class).getName();
private static final long ONE_MINUTE_OF_MILLISECONDS = 1000 * 60;
diff --git a/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxEventsManagerIntegrationTest.java b/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxEventsManagerIT.java
similarity index 92%
rename from components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxEventsManagerIntegrationTest.java
rename to components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxEventsManagerIT.java
index 630ce8d..9d68868 100644
--- a/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxEventsManagerIntegrationTest.java
+++ b/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxEventsManagerIT.java
@@ -30,6 +30,7 @@ import org.apache.camel.component.box.internal.BoxApiCollection;
import org.apache.camel.component.box.internal.BoxEventsManagerApiMethod;
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;
@@ -41,9 +42,11 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
* remove @Ignore annotations. The class source won't be generated again if the generator MOJO finds it under
* src/test/java.
*/
-public class BoxEventsManagerIntegrationTest extends AbstractBoxTestSupport {
+@EnabledIf(value = "org.apache.camel.component.box.AbstractBoxITSupport#hasCredentials",
+ disabledReason = "Box credentials were not provided")
+public class BoxEventsManagerIT extends AbstractBoxITSupport {
- private static final Logger LOG = LoggerFactory.getLogger(BoxEventsManagerIntegrationTest.class);
+ private static final Logger LOG = LoggerFactory.getLogger(BoxEventsManagerIT.class);
private static final String PATH_PREFIX = BoxApiCollection.getCollection()
.getApiName(BoxEventsManagerApiMethod.class).getName();
private static final String CAMEL_TEST_FILE = "/CamelTestFile.txt";
diff --git a/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxFilesManagerIntegrationTest.java b/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxFilesManagerIT.java
similarity index 98%
rename from components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxFilesManagerIntegrationTest.java
rename to components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxFilesManagerIT.java
index 64f2d31..be89a1e 100644
--- a/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxFilesManagerIntegrationTest.java
+++ b/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxFilesManagerIT.java
@@ -39,6 +39,7 @@ import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
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;
@@ -51,9 +52,11 @@ import static org.junit.jupiter.api.Assertions.fail;
/**
* Test class for {@link BoxFilesManager} APIs.
*/
-public class BoxFilesManagerIntegrationTest extends AbstractBoxTestSupport {
+@EnabledIf(value = "org.apache.camel.component.box.AbstractBoxITSupport#hasCredentials",
+ disabledReason = "Box credentials were not provided")
+public class BoxFilesManagerIT extends AbstractBoxITSupport {
- private static final Logger LOG = LoggerFactory.getLogger(BoxFilesManagerIntegrationTest.class);
+ private static final Logger LOG = LoggerFactory.getLogger(BoxFilesManagerIT.class);
private static final String PATH_PREFIX = BoxApiCollection.getCollection()
.getApiName(BoxFilesManagerApiMethod.class).getName();
diff --git a/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxFoldersManagerIntegrationTest.java b/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxFoldersManagerIT.java
similarity index 97%
rename from components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxFoldersManagerIntegrationTest.java
rename to components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxFoldersManagerIT.java
index 3ee4b68..48e94b5 100644
--- a/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxFoldersManagerIntegrationTest.java
+++ b/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxFoldersManagerIT.java
@@ -31,6 +31,7 @@ import org.apache.camel.component.box.internal.BoxFoldersManagerApiMethod;
import org.junit.jupiter.api.AfterEach;
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;
@@ -41,16 +42,18 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
/**
* Test class for {@link BoxFoldersManager} APIs.
*/
-public class BoxFoldersManagerIntegrationTest extends AbstractBoxTestSupport {
+@EnabledIf(value = "org.apache.camel.component.box.AbstractBoxITSupport#hasCredentials",
+ disabledReason = "Box credentials were not provided")
+public class BoxFoldersManagerIT extends AbstractBoxITSupport {
- private static final Logger LOG = LoggerFactory.getLogger(BoxFoldersManagerIntegrationTest.class);
+ private static final Logger LOG = LoggerFactory.getLogger(BoxFoldersManagerIT.class);
private static final String PATH_PREFIX = BoxApiCollection.getCollection()
.getApiName(BoxFoldersManagerApiMethod.class).getName();
private static final String CAMEL_TEST_FOLDER = "CamelTestFolder";
private static final String CAMEL_TEST_FOLDER_DESCRIPTION = "This is a description of CamelTestFolder";
- private static final String CAMEL_TEST_COPY_FOLDER = BoxFoldersManagerIntegrationTest.CAMEL_TEST_FOLDER + "_Copy";
- private static final String CAMEL_TEST_MOVE_FOLDER = BoxFoldersManagerIntegrationTest.CAMEL_TEST_FOLDER + "_Move";
- private static final String CAMEL_TEST_RENAME_FOLDER = BoxFoldersManagerIntegrationTest.CAMEL_TEST_FOLDER
+ private static final String CAMEL_TEST_COPY_FOLDER = BoxFoldersManagerIT.CAMEL_TEST_FOLDER + "_Copy";
+ private static final String CAMEL_TEST_MOVE_FOLDER = BoxFoldersManagerIT.CAMEL_TEST_FOLDER + "_Move";
+ private static final String CAMEL_TEST_RENAME_FOLDER = BoxFoldersManagerIT.CAMEL_TEST_FOLDER
+ "_Rename";
private static final String CAMEL_TEST_ROOT_FOLDER_ID = "0";
private static final String CAMEL_TEST_DESTINATION_FOLDER_ID = "0";
diff --git a/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxGroupsManagerIntegrationTest.java b/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxGroupsManagerIT.java
similarity index 97%
rename from components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxGroupsManagerIntegrationTest.java
rename to components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxGroupsManagerIT.java
index dfbffec..eb6935e 100644
--- a/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxGroupsManagerIntegrationTest.java
+++ b/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxGroupsManagerIT.java
@@ -31,6 +31,7 @@ import org.apache.camel.component.box.internal.BoxGroupsManagerApiMethod;
import org.junit.jupiter.api.AfterEach;
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;
@@ -41,9 +42,11 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
/**
* Test class for {@link BoxGroupsManager} APIs.
*/
-public class BoxGroupsManagerIntegrationTest extends AbstractBoxTestSupport {
+@EnabledIf(value = "org.apache.camel.component.box.AbstractBoxITSupport#hasCredentials",
+ disabledReason = "Box credentials were not provided")
+public class BoxGroupsManagerIT extends AbstractBoxITSupport {
- private static final Logger LOG = LoggerFactory.getLogger(BoxGroupsManagerIntegrationTest.class);
+ private static final Logger LOG = LoggerFactory.getLogger(BoxGroupsManagerIT.class);
private static final String PATH_PREFIX = BoxApiCollection.getCollection()
.getApiName(BoxGroupsManagerApiMethod.class).getName();
private static final String CAMEL_TEST_GROUP_DESCRIPTION = "CamelTestGroupDescription";
diff --git a/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxSearchManagerIntegrationTest.java b/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxSearchManagerIT.java
similarity index 90%
rename from components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxSearchManagerIntegrationTest.java
rename to components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxSearchManagerIT.java
index 4eee6ca..c464dbb 100644
--- a/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxSearchManagerIntegrationTest.java
+++ b/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxSearchManagerIT.java
@@ -24,6 +24,7 @@ import org.apache.camel.component.box.api.BoxSearchManager;
import org.apache.camel.component.box.internal.BoxApiCollection;
import org.apache.camel.component.box.internal.BoxSearchManagerApiMethod;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.condition.EnabledIf;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -32,9 +33,11 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
/**
* Test class for {@link BoxSearchManager} APIs.
*/
-public class BoxSearchManagerIntegrationTest extends AbstractBoxTestSupport {
+@EnabledIf(value = "org.apache.camel.component.box.AbstractBoxITSupport#hasCredentials",
+ disabledReason = "Box credentials were not provided")
+public class BoxSearchManagerIT extends AbstractBoxITSupport {
- private static final Logger LOG = LoggerFactory.getLogger(BoxSearchManagerIntegrationTest.class);
+ private static final Logger LOG = LoggerFactory.getLogger(BoxSearchManagerIT.class);
private static final String PATH_PREFIX = BoxApiCollection.getCollection()
.getApiName(BoxSearchManagerApiMethod.class).getName();
diff --git a/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxTasksManagerIntegrationTest.java b/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxTasksManagerIT.java
similarity index 97%
rename from components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxTasksManagerIntegrationTest.java
rename to components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxTasksManagerIT.java
index 30bdcf8..3c4eba4 100644
--- a/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxTasksManagerIntegrationTest.java
+++ b/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxTasksManagerIT.java
@@ -37,6 +37,7 @@ import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
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;
@@ -46,9 +47,11 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
/**
* Test class for {@link BoxTasksManager} APIs.
*/
-public class BoxTasksManagerIntegrationTest extends AbstractBoxTestSupport {
+@EnabledIf(value = "org.apache.camel.component.box.AbstractBoxITSupport#hasCredentials",
+ disabledReason = "Box credentials were not provided")
+public class BoxTasksManagerIT extends AbstractBoxITSupport {
- private static final Logger LOG = LoggerFactory.getLogger(BoxTasksManagerIntegrationTest.class);
+ private static final Logger LOG = LoggerFactory.getLogger(BoxTasksManagerIT.class);
private static final String PATH_PREFIX = BoxApiCollection.getCollection()
.getApiName(BoxTasksManagerApiMethod.class).getName();
private static final String CAMEL_TEST_FILE = "/CamelTestFile.txt";
diff --git a/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxUsersManagerIntegrationTest.java b/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxUsersManagerIT.java
similarity index 98%
rename from components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxUsersManagerIntegrationTest.java
rename to components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxUsersManagerIT.java
index 2001548..01fcc31 100644
--- a/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxUsersManagerIntegrationTest.java
+++ b/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxUsersManagerIT.java
@@ -33,6 +33,7 @@ import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
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;
@@ -45,9 +46,11 @@ import static org.junit.jupiter.api.Assumptions.assumeTrue;
/**
* Test class for {@link BoxUsersManager} APIs.
*/
-public class BoxUsersManagerIntegrationTest extends AbstractBoxTestSupport {
+@EnabledIf(value = "org.apache.camel.component.box.AbstractBoxITSupport#hasCredentials",
+ disabledReason = "Box credentials were not provided")
+public class BoxUsersManagerIT extends AbstractBoxITSupport {
- private static final Logger LOG = LoggerFactory.getLogger(BoxUsersManagerIntegrationTest.class);
+ private static final Logger LOG = LoggerFactory.getLogger(BoxUsersManagerIT.class);
private static final String PATH_PREFIX = BoxApiCollection.getCollection()
.getApiName(BoxUsersManagerApiMethod.class).getName();
private static final String CAMEL_TEST_USER_EMAIL_ALIAS = "camel@example.com";