This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
The following commit(s) were added to refs/heads/main by this push: new 4562ae7c545 FTP tests fixes, routes lazy loading, after server config (#871) 4562ae7c545 is described below commit 4562ae7c545902e2319e8d98a79def9940dab8fd Author: Marco Carletti <mcarl...@redhat.com> AuthorDate: Wed Jun 21 13:39:13 2023 +0200 FTP tests fixes, routes lazy loading, after server config (#871) --- .../ftps/FileToFtpsImplicitSSLWithClientAuthTest.java | 10 ++++++++-- .../ftps/FileToFtpsWithCustomTrustStorePropertiesTest.java | 10 ++++++++-- .../camel/component/file/remote/springboot/ftps/FtpsTest.java | 10 ++++++++-- .../springboot/sftp/SftpConsumerLocalWorkDirectoryTest.java | 8 ++++++-- .../remote/springboot/sftp/SftpKeyExchangeProtocolsTest.java | 9 +++++++-- .../file/remote/springboot/sftp/SftpUseListFalseTest.java | 10 ++++++++-- 6 files changed, 45 insertions(+), 12 deletions(-) diff --git a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/FileToFtpsImplicitSSLWithClientAuthTest.java b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/FileToFtpsImplicitSSLWithClientAuthTest.java index e66a88eb69b..ecc32628a20 100644 --- a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/FileToFtpsImplicitSSLWithClientAuthTest.java +++ b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/FileToFtpsImplicitSSLWithClientAuthTest.java @@ -22,6 +22,8 @@ import org.apache.camel.component.file.remote.springboot.ftp.BaseFtp; import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.spring.boot.CamelAutoConfiguration; import org.apache.camel.test.spring.junit5.CamelSpringBootTest; + +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.context.annotation.Bean; @@ -31,8 +33,7 @@ import org.springframework.context.annotation.Configuration; @SpringBootTest( classes = { CamelAutoConfiguration.class, - FileToFtpsImplicitSSLWithClientAuthTest.class, - FileToFtpsImplicitSSLWithClientAuthTest.TestConfiguration.class + FileToFtpsImplicitSSLWithClientAuthTest.class } ) //Based on FileToFtpsImplicitSSLWithClientAuthIT @@ -56,6 +57,11 @@ public class FileToFtpsImplicitSSLWithClientAuthTest extends BaseFtpsImplicitCli assertMockEndpointsSatisfied(); } + @BeforeEach + public void addRoute() throws Exception { + context.addRoutes(new TestConfiguration().routeBuilder()); + } + // ************************************* // Config // ************************************* diff --git a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/FileToFtpsWithCustomTrustStorePropertiesTest.java b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/FileToFtpsWithCustomTrustStorePropertiesTest.java index d2c0549089d..2abfb4d7322 100644 --- a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/FileToFtpsWithCustomTrustStorePropertiesTest.java +++ b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/FileToFtpsWithCustomTrustStorePropertiesTest.java @@ -22,6 +22,8 @@ import org.apache.camel.component.file.remote.springboot.ftp.BaseFtp; import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.spring.boot.CamelAutoConfiguration; import org.apache.camel.test.spring.junit5.CamelSpringBootTest; + +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.context.annotation.Bean; @@ -31,8 +33,7 @@ import org.springframework.context.annotation.Configuration; @SpringBootTest( classes = { CamelAutoConfiguration.class, - FileToFtpsWithCustomTrustStorePropertiesTest.class, - FileToFtpsWithCustomTrustStorePropertiesTest.TestConfiguration.class + FileToFtpsWithCustomTrustStorePropertiesTest.class } ) //based on FileToFtpsWithCustomTrustStorePropertiesIT @@ -57,6 +58,11 @@ public class FileToFtpsWithCustomTrustStorePropertiesTest extends BaseFtpsClient assertMockEndpointsSatisfied(); } + @BeforeEach + public void addRoute() throws Exception { + context.addRoutes(new TestConfiguration().routeBuilder()); + } + // ************************************* // Config // ************************************* diff --git a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/FtpsTest.java b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/FtpsTest.java index d0809543b97..173c23a9a09 100644 --- a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/FtpsTest.java +++ b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/FtpsTest.java @@ -22,6 +22,8 @@ import org.apache.camel.component.file.remote.springboot.ftp.BaseFtp; import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.spring.boot.CamelAutoConfiguration; import org.apache.camel.test.spring.junit5.CamelSpringBootTest; + +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.context.annotation.Bean; @@ -31,8 +33,7 @@ import org.springframework.context.annotation.Configuration; @SpringBootTest( classes = { CamelAutoConfiguration.class, - FtpsTest.class, - FtpsTest.TestConfiguration.class + FtpsTest.class } ) //based on FileToFtpsWithCustomTrustStorePropertiesIT @@ -56,6 +57,11 @@ public class FtpsTest extends BaseFtpsClientAuth { assertMockEndpointsSatisfied(); } + @BeforeEach + public void addRoute() throws Exception { + context.addRoutes(new TestConfiguration().routeBuilder()); + } + // ************************************* // Config // ************************************* diff --git a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/SftpConsumerLocalWorkDirectoryTest.java b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/SftpConsumerLocalWorkDirectoryTest.java index 23e7ba6f14a..c9bc25e0ec9 100644 --- a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/SftpConsumerLocalWorkDirectoryTest.java +++ b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/SftpConsumerLocalWorkDirectoryTest.java @@ -44,8 +44,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue; @SpringBootTest( classes = { CamelAutoConfiguration.class, - SftpConsumerLocalWorkDirectoryTest.class, - SftpConsumerLocalWorkDirectoryTest.TestConfiguration.class + SftpConsumerLocalWorkDirectoryTest.class } ) //Based on SftpConsumerLocalWorkDirectoryIT @@ -99,6 +98,11 @@ public class SftpConsumerLocalWorkDirectoryTest extends BaseSftp { assertFileNotExists(ftpFile("lwd/hello.txt")); } + @BeforeEach + public void addRoute() throws Exception { + context.addRoutes(new TestConfiguration().routeBuilder()); + } + // ************************************* // Config // ************************************* diff --git a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/SftpKeyExchangeProtocolsTest.java b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/SftpKeyExchangeProtocolsTest.java index b52c5588f4c..125f3e05d9e 100644 --- a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/SftpKeyExchangeProtocolsTest.java +++ b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/SftpKeyExchangeProtocolsTest.java @@ -31,6 +31,7 @@ import org.hamcrest.Matchers; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.parallel.Isolated; import org.springframework.boot.test.context.SpringBootTest; @@ -46,8 +47,7 @@ import java.util.List; @SpringBootTest( classes = { CamelAutoConfiguration.class, - SftpKeyExchangeProtocolsTest.class, - SftpKeyExchangeProtocolsTest.TestConfiguration.class + SftpKeyExchangeProtocolsTest.class } ) //Based on SftpKeyExchangeProtocolsIT @@ -120,6 +120,11 @@ public class SftpKeyExchangeProtocolsTest extends BaseSftp { result.assertIsSatisfied(); } + @BeforeEach + public void addRoute() throws Exception { + context.addRoutes(new TestConfiguration().routeBuilder()); + } + // ************************************* // Config // ************************************* diff --git a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/SftpUseListFalseTest.java b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/SftpUseListFalseTest.java index e754d0cc096..ba91b07b8b7 100644 --- a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/SftpUseListFalseTest.java +++ b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/SftpUseListFalseTest.java @@ -25,6 +25,8 @@ import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.spring.boot.CamelAutoConfiguration; import org.apache.camel.test.spring.junit5.CamelSpringBootTest; import org.apache.camel.util.FileUtil; + +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.EnabledIf; import org.springframework.boot.test.context.SpringBootTest; @@ -41,8 +43,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue; @SpringBootTest( classes = { CamelAutoConfiguration.class, - SftpUseListFalseTest.class, - SftpUseListFalseTest.TestConfiguration.class + SftpUseListFalseTest.class } ) //Based on SftpUseListFalseIT @@ -67,6 +68,11 @@ public class SftpUseListFalseTest extends BaseSftp { assertMockEndpointsSatisfied(); } + @BeforeEach + public void addRoute() throws Exception { + context.addRoutes(new TestConfiguration().routeBuilder()); + } + // ************************************* // Config // *************************************