james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject svn commit: r1687795 - /james/mpt/trunk/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/host/CyrusHostSystem.java
Date Fri, 26 Jun 2015 16:18:22 GMT
Author: btellier
Date: Fri Jun 26 16:18:22 2015
New Revision: 1687795

URL: http://svn.apache.org/r1687795
Log:
MPT-17 Create a mailbox for every created user on Cyrus backend - contributed by Matthieu
Baechlor

Modified:
    james/mpt/trunk/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/host/CyrusHostSystem.java

Modified: james/mpt/trunk/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/host/CyrusHostSystem.java
URL: http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/host/CyrusHostSystem.java?rev=1687795&r1=1687794&r2=1687795&view=diff
==============================================================================
--- james/mpt/trunk/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/host/CyrusHostSystem.java
(original)
+++ james/mpt/trunk/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/host/CyrusHostSystem.java
Fri Jun 26 16:18:22 2015
@@ -20,6 +20,7 @@ package org.apache.james.mpt.imapmailbox
 
 import java.net.InetSocketAddress;
 
+import org.apache.james.mailbox.model.MailboxConstants;
 import org.apache.james.mailbox.model.MailboxPath;
 import org.apache.james.mpt.api.Session;
 import org.apache.james.mpt.api.UserAdder;
@@ -55,6 +56,16 @@ public class CyrusHostSystem extends Ext
         return addressSupplier.get();
     }
     
+    @Override
+    public boolean addUser(String user, String password) throws Exception {
+        return super.addUser(user, password) && createUserInbox(user);
+    }
+
+    private boolean createUserInbox(String user) {
+        createMailbox(new MailboxPath(MailboxConstants.USER_NAMESPACE, user, ""));
+        return true;
+    }
+    
     public void beforeTest() throws Exception {
         container = docker.start();
         addressSupplier = new Supplier<InetSocketAddress>() {



---------------------------------------------------------------------
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