This is an automated email from the ASF dual-hosted git repository. btellier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 41845d34e11c132555e36ced7baee9521fb4c0da Author: Gautier DI FOLCO <gdifo...@linagora.com> AuthorDate: Mon Jul 8 14:47:36 2019 +0200 JAMES-2726 Use MemoryMailRepository for mailet Integration tests --- .../src/test/java/org/apache/james/mailets/MailetErrorsTest.java | 2 +- .../java/org/apache/james/mailets/NetworkMatcherIntegrationTest.java | 2 +- .../test/java/org/apache/james/mailets/SmtpAuthIntegrationTest.java | 2 +- .../java/org/apache/james/mailets/configuration/CommonProcessors.java | 4 ++-- .../java/org/apache/james/transport/mailets/AliasMappingTest.java | 2 +- .../java/org/apache/james/transport/mailets/DlpIntegrationTest.java | 2 +- .../james/transport/mailets/MailReprocessingIntegrationTest.java | 4 ++-- .../java/org/apache/james/transport/mailets/ToRepositoryTest.java | 2 +- .../apache/james/transport/mailets/ToSenderDomainRepositoryTest.java | 4 ++-- .../integration-testing/src/test/resources/mailrepositorystore.xml | 4 ++-- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/MailetErrorsTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/MailetErrorsTest.java index e78e3bd..c5e13dc 100644 --- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/MailetErrorsTest.java +++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/MailetErrorsTest.java @@ -50,7 +50,7 @@ import org.junit.rules.TemporaryFolder; public class MailetErrorsTest { public static final String CUSTOM_PROCESSOR = "custom"; - public static final MailRepositoryUrl CUSTOM_REPOSITORY = MailRepositoryUrl.from("file://var/mail/custom/"); + public static final MailRepositoryUrl CUSTOM_REPOSITORY = MailRepositoryUrl.from("memory://var/mail/custom/"); @Rule public TemporaryFolder temporaryFolder = new TemporaryFolder(); diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/NetworkMatcherIntegrationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/NetworkMatcherIntegrationTest.java index f372d05..0c1af05 100644 --- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/NetworkMatcherIntegrationTest.java +++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/NetworkMatcherIntegrationTest.java @@ -49,7 +49,7 @@ import org.junit.rules.TemporaryFolder; public class NetworkMatcherIntegrationTest { private static final String FROM = "fromuser@" + DEFAULT_DOMAIN; - private static final MailRepositoryUrl DROPPED_MAILS = MailRepositoryUrl.from("file://var/mail/dropped-mails/"); + private static final MailRepositoryUrl DROPPED_MAILS = MailRepositoryUrl.from("memory://var/mail/dropped-mails/"); @Rule public TemporaryFolder temporaryFolder = new TemporaryFolder(); diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SmtpAuthIntegrationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SmtpAuthIntegrationTest.java index b51eb40..d96391b 100644 --- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SmtpAuthIntegrationTest.java +++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SmtpAuthIntegrationTest.java @@ -50,7 +50,7 @@ import org.junit.rules.TemporaryFolder; public class SmtpAuthIntegrationTest { private static final String FROM = "fromuser@" + DEFAULT_DOMAIN; - private static final MailRepositoryUrl DROPPED_MAILS = MailRepositoryUrl.from("file://var/mail/dropped-mails/"); + private static final MailRepositoryUrl DROPPED_MAILS = MailRepositoryUrl.from("memory://var/mail/dropped-mails/"); @Rule public IMAPMessageReader imapMessageReader = new IMAPMessageReader(); diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/CommonProcessors.java b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/CommonProcessors.java index 5ccda3f..10454f2 100644 --- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/CommonProcessors.java +++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/CommonProcessors.java @@ -44,8 +44,8 @@ import org.apache.james.transport.matchers.SMTPAuthSuccessful; public class CommonProcessors { - public static final MailRepositoryUrl ERROR_REPOSITORY = MailRepositoryUrl.from("file://var/mail/error/"); - public static final MailRepositoryUrl RRT_ERROR_REPOSITORY = MailRepositoryUrl.from("file://var/mail/rrt-error/"); + public static final MailRepositoryUrl ERROR_REPOSITORY = MailRepositoryUrl.from("memory://var/mail/error/"); + public static final MailRepositoryUrl RRT_ERROR_REPOSITORY = MailRepositoryUrl.from("memory://var/mail/rrt-error/"); private static final String RRT_ERROR = "rrt-error"; public static ProcessorConfiguration root() { diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AliasMappingTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AliasMappingTest.java index 1450c1a..3422ec7 100644 --- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AliasMappingTest.java +++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AliasMappingTest.java @@ -75,7 +75,7 @@ public class AliasMappingTest { private static final String GROUP_ALIAS = GROUP + "-alias@" + DOMAIN; private static final String MESSAGE_CONTENT = "any text"; - private static final MailRepositoryUrl RRT_ERROR_REPOSITORY = MailRepositoryUrl.from("file://var/mail/rrt-error/"); + private static final MailRepositoryUrl RRT_ERROR_REPOSITORY = MailRepositoryUrl.from("memory://var/mail/rrt-error/"); private TemporaryJamesServer jamesServer; private MimeMessage message; diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/DlpIntegrationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/DlpIntegrationTest.java index 9df98ff..413bde7 100644 --- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/DlpIntegrationTest.java +++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/DlpIntegrationTest.java @@ -55,7 +55,7 @@ import com.google.inject.util.Modules; import io.restassured.specification.RequestSpecification; public class DlpIntegrationTest { - public static final String REPOSITORY_PREFIX = "file://var/mail/dlp/quarantine/"; + public static final String REPOSITORY_PREFIX = "memory://var/mail/dlp/quarantine/"; @Rule public TemporaryFolder folder = new TemporaryFolder(); diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/MailReprocessingIntegrationTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/MailReprocessingIntegrationTest.java index b8e09eb..cc6fc22 100644 --- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/MailReprocessingIntegrationTest.java +++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/MailReprocessingIntegrationTest.java @@ -57,8 +57,8 @@ import com.google.inject.util.Modules; import io.restassured.specification.RequestSpecification; public class MailReprocessingIntegrationTest { - private static final MailRepositoryUrl REPOSITORY_A = MailRepositoryUrl.from("file://var/mail/a"); - private static final MailRepositoryUrl REPOSITORY_B = MailRepositoryUrl.from("file://var/mail/b"); + private static final MailRepositoryUrl REPOSITORY_A = MailRepositoryUrl.from("memory://var/mail/a"); + private static final MailRepositoryUrl REPOSITORY_B = MailRepositoryUrl.from("memory://var/mail/b"); @Rule public TemporaryFolder folder = new TemporaryFolder(); diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ToRepositoryTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ToRepositoryTest.java index 916446f..b37eea2 100644 --- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ToRepositoryTest.java +++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ToRepositoryTest.java @@ -53,7 +53,7 @@ import io.restassured.specification.RequestSpecification; public class ToRepositoryTest { private static final String RECIPIENT = "touser@" + DEFAULT_DOMAIN; - public static final MailRepositoryUrl CUSTOM_REPOSITORY = MailRepositoryUrl.from("file://var/mail/custom/"); + public static final MailRepositoryUrl CUSTOM_REPOSITORY = MailRepositoryUrl.from("memory://var/mail/custom/"); @Rule public TemporaryFolder temporaryFolder = new TemporaryFolder(); diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ToSenderDomainRepositoryTest.java b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ToSenderDomainRepositoryTest.java index 261ca30..9e360b9 100644 --- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ToSenderDomainRepositoryTest.java +++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ToSenderDomainRepositoryTest.java @@ -44,9 +44,9 @@ import org.junit.rules.TemporaryFolder; public class ToSenderDomainRepositoryTest { private static final String RECIPIENT = "touser@" + DEFAULT_DOMAIN; - private static final String CUSTOM_REPOSITORY_PREFIX = "file://var/mail/custom/"; + private static final String CUSTOM_REPOSITORY_PREFIX = "memory://var/mail/custom/"; public static final MailRepositoryUrl DOMAIN_URL = MailRepositoryUrl.from(CUSTOM_REPOSITORY_PREFIX + DEFAULT_DOMAIN); - public static final MailRepositoryUrl AWAIT_REPOSITORY_PATH = MailRepositoryUrl.from("file://var/mail/await/"); + public static final MailRepositoryUrl AWAIT_REPOSITORY_PATH = MailRepositoryUrl.from("memory://var/mail/await/"); @Rule public TemporaryFolder temporaryFolder = new TemporaryFolder(); diff --git a/server/mailet/integration-testing/src/test/resources/mailrepositorystore.xml b/server/mailet/integration-testing/src/test/resources/mailrepositorystore.xml index 3ca4a1d..7685e0d 100644 --- a/server/mailet/integration-testing/src/test/resources/mailrepositorystore.xml +++ b/server/mailet/integration-testing/src/test/resources/mailrepositorystore.xml @@ -21,9 +21,9 @@ <mailrepositorystore> <mailrepositories> - <mailrepository class="org.apache.james.mailrepository.file.FileMailRepository"> + <mailrepository class="org.apache.james.mailrepository.memory.MemoryMailRepository"> <protocols> - <protocol>file</protocol> + <protocol>memory</protocol> </protocols> <config FIFO="false" CACHEKEYS="true"/> </mailrepository> --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org