james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [30/44] james-project git commit: JAMES-2267 Some SMTP related tests don't need MailetContainer customization
Date Fri, 05 Jan 2018 03:01:14 GMT
JAMES-2267 Some SMTP related tests don't need MailetContainer customization


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/ea8b4de9
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/ea8b4de9
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/ea8b4de9

Branch: refs/heads/master
Commit: ea8b4de99eff3240dcd77e4f02d0f440d4d08813
Parents: 0b7685a
Author: benwa <btellier@linagora.com>
Authored: Thu Dec 21 10:54:32 2017 +0700
Committer: benwa <btellier@linagora.com>
Committed: Fri Jan 5 09:33:52 2018 +0700

----------------------------------------------------------------------
 .../james/smtp/SmtpBracketEnforcementTest.java  | 27 --------------------
 .../smtp/SmtpIdentityVerificationTest.java      | 23 -----------------
 .../james/smtp/SmtpSizeLimitationTest.java      | 27 --------------------
 3 files changed, 77 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/ea8b4de9/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpBracketEnforcementTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpBracketEnforcementTest.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpBracketEnforcementTest.java
index 30d2783..ca52508 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpBracketEnforcementTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpBracketEnforcementTest.java
@@ -25,16 +25,9 @@ import static org.apache.james.mailets.configuration.Constants.PASSWORD;
 import static org.apache.james.mailets.configuration.Constants.SMTP_PORT;
 import static org.apache.james.mailets.configuration.Constants.awaitOneMinute;
 
-import org.apache.james.MemoryJamesServerMain;
 import org.apache.james.mailets.TemporaryJamesServer;
-import org.apache.james.mailets.configuration.CommonProcessors;
-import org.apache.james.mailets.configuration.MailetConfiguration;
-import org.apache.james.mailets.configuration.MailetContainer;
-import org.apache.james.mailets.configuration.ProcessorConfiguration;
 import org.apache.james.mailets.configuration.SmtpConfiguration;
 import org.apache.james.probe.DataProbe;
-import org.apache.james.transport.mailets.ToProcessor;
-import org.apache.james.transport.matchers.All;
 import org.apache.james.utils.DataProbeImpl;
 import org.apache.james.utils.SMTPMessageSender;
 import org.junit.After;
@@ -53,28 +46,8 @@ public class SmtpBracketEnforcementTest {
     private TemporaryJamesServer jamesServer;
 
     private void createJamesServer(SmtpConfiguration.Builder smtpConfiguration) throws Exception
{
-        MailetContainer mailetContainer = MailetContainer.builder()
-            .addProcessor(ProcessorConfiguration.root()
-                .addMailet(MailetConfiguration.builder()
-                    .matcher(All.class)
-                    .mailet(ToProcessor.class)
-                    .addProperty("processor", ProcessorConfiguration.STATE_TRANSPORT)))
-            .addProcessor(CommonProcessors.error())
-            .addProcessor(ProcessorConfiguration.transport()
-                .addMailet(MailetConfiguration.BCC_STRIPPER)
-                .addMailet(MailetConfiguration.LOCAL_DELIVERY)
-                .addMailet(MailetConfiguration.builder()
-                    .matcher(All.class)
-                    .mailet(ToProcessor.class)
-                    .addProperty("processor", ProcessorConfiguration.STATE_BOUNCES)))
-            .addProcessor(CommonProcessors.localAddressError())
-            .addProcessor(CommonProcessors.relayDenied())
-            .addProcessor(CommonProcessors.bounces())
-            .build();
         jamesServer = TemporaryJamesServer.builder()
-            .withBase(MemoryJamesServerMain.SMTP_ONLY_MODULE)
             .withSmtpConfiguration(smtpConfiguration)
-            .withMailetContainer(mailetContainer)
             .build(temporaryFolder);
 
         DataProbe dataProbe = jamesServer.getProbe(DataProbeImpl.class);

http://git-wip-us.apache.org/repos/asf/james-project/blob/ea8b4de9/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpIdentityVerificationTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpIdentityVerificationTest.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpIdentityVerificationTest.java
index 677d827..fdf7f7c 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpIdentityVerificationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpIdentityVerificationTest.java
@@ -25,16 +25,9 @@ import static org.apache.james.mailets.configuration.Constants.PASSWORD;
 import static org.apache.james.mailets.configuration.Constants.SMTP_PORT;
 import static org.apache.james.mailets.configuration.Constants.awaitOneMinute;
 
-import org.apache.james.MemoryJamesServerMain;
 import org.apache.james.mailets.TemporaryJamesServer;
-import org.apache.james.mailets.configuration.CommonProcessors;
-import org.apache.james.mailets.configuration.MailetConfiguration;
-import org.apache.james.mailets.configuration.MailetContainer;
-import org.apache.james.mailets.configuration.ProcessorConfiguration;
 import org.apache.james.mailets.configuration.SmtpConfiguration;
 import org.apache.james.probe.DataProbe;
-import org.apache.james.transport.mailets.ToProcessor;
-import org.apache.james.transport.matchers.All;
 import org.apache.james.utils.DataProbeImpl;
 import org.apache.james.utils.SMTPMessageSender;
 import org.junit.After;
@@ -56,24 +49,8 @@ public class SmtpIdentityVerificationTest {
     private TemporaryJamesServer jamesServer;
 
     private void createJamesServer(SmtpConfiguration.Builder smtpConfiguration) throws Exception
{
-        MailetContainer mailetContainer = MailetContainer.builder()
-            .addProcessor(ProcessorConfiguration.root()
-                .addMailet(MailetConfiguration.builder()
-                    .matcher(All.class)
-                    .mailet(ToProcessor.class)
-                    .addProperty("processor", ProcessorConfiguration.STATE_TRANSPORT)))
-            .addProcessor(CommonProcessors.error())
-            .addProcessor(ProcessorConfiguration.transport()
-                .addMailet(MailetConfiguration.BCC_STRIPPER)
-                .addMailet(MailetConfiguration.LOCAL_DELIVERY))
-            .addProcessor(CommonProcessors.localAddressError())
-            .addProcessor(CommonProcessors.relayDenied())
-            .addProcessor(CommonProcessors.bounces())
-            .build();
         jamesServer = TemporaryJamesServer.builder()
-            .withBase(MemoryJamesServerMain.SMTP_ONLY_MODULE)
             .withSmtpConfiguration(smtpConfiguration)
-            .withMailetContainer(mailetContainer)
             .build(temporaryFolder);
 
         DataProbe dataProbe = jamesServer.getProbe(DataProbeImpl.class);

http://git-wip-us.apache.org/repos/asf/james-project/blob/ea8b4de9/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpSizeLimitationTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpSizeLimitationTest.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpSizeLimitationTest.java
index 657cdc3..1509c26 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpSizeLimitationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpSizeLimitationTest.java
@@ -25,16 +25,9 @@ import static org.apache.james.mailets.configuration.Constants.PASSWORD;
 import static org.apache.james.mailets.configuration.Constants.SMTP_PORT;
 import static org.apache.james.mailets.configuration.Constants.awaitOneMinute;
 
-import org.apache.james.MemoryJamesServerMain;
 import org.apache.james.mailets.TemporaryJamesServer;
-import org.apache.james.mailets.configuration.CommonProcessors;
-import org.apache.james.mailets.configuration.MailetConfiguration;
-import org.apache.james.mailets.configuration.MailetContainer;
-import org.apache.james.mailets.configuration.ProcessorConfiguration;
 import org.apache.james.mailets.configuration.SmtpConfiguration;
 import org.apache.james.probe.DataProbe;
-import org.apache.james.transport.mailets.ToProcessor;
-import org.apache.james.transport.matchers.All;
 import org.apache.james.utils.DataProbeImpl;
 import org.apache.james.utils.SMTPMessageSender;
 import org.junit.After;
@@ -55,28 +48,8 @@ public class SmtpSizeLimitationTest {
     private TemporaryJamesServer jamesServer;
 
     private void createJamesServer(SmtpConfiguration.Builder smtpConfiguration) throws Exception
{
-        MailetContainer mailetContainer = MailetContainer.builder()
-            .addProcessor(ProcessorConfiguration.root()
-                .addMailet(MailetConfiguration.builder()
-                    .matcher(All.class)
-                    .mailet(ToProcessor.class)
-                    .addProperty("processor", ProcessorConfiguration.STATE_TRANSPORT)))
-            .addProcessor(CommonProcessors.error())
-            .addProcessor(ProcessorConfiguration.transport()
-                .addMailet(MailetConfiguration.BCC_STRIPPER)
-                .addMailet(MailetConfiguration.LOCAL_DELIVERY)
-                .addMailet(MailetConfiguration.builder()
-                    .matcher(All.class)
-                    .mailet(ToProcessor.class)
-                    .addProperty("processor", ProcessorConfiguration.STATE_BOUNCES)))
-            .addProcessor(CommonProcessors.localAddressError())
-            .addProcessor(CommonProcessors.relayDenied())
-            .addProcessor(CommonProcessors.bounces())
-            .build();
         jamesServer = TemporaryJamesServer.builder()
-            .withBase(MemoryJamesServerMain.SMTP_ONLY_MODULE)
             .withSmtpConfiguration(smtpConfiguration)
-            .withMailetContainer(mailetContainer)
             .build(temporaryFolder);
 
         DataProbe dataProbe = jamesServer.getProbe(DataProbeImpl.class);


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message