JAMES-2514 IMAP MPT tests for long mailbox name rejection
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/ea545219 Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/ea545219 Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/ea545219 Branch: refs/heads/master Commit: ea54521905ea9b1c2da879a0b4bc314330afd493 Parents: ecad66b Author: Benoit Tellier <[email protected]> Authored: Fri Aug 3 09:52:30 2018 +0700 Committer: Benoit Tellier <[email protected]> Committed: Sat Aug 4 08:17:14 2018 +0700 ---------------------------------------------------------------------- .../CassandraMailboxWithLongNameErrorTest.java | 2 - .../suite/MailboxWithLongNameError.java | 6 +- .../suite/MailboxWithLongNameSuccess.java | 55 -- .../imap/scripts/CreateErrorWithLongName.test | 797 +----------------- .../imap/scripts/CreateSuccessWithLongName.test | 822 ------------------- .../InMemoryMailboxWithLongNameErrorTest.java | 42 + .../InMemoryMailboxWithLongNameSuccessTest.java | 44 - .../jpa/JpaMailboxWithLongNameErrorTest.java | 3 +- .../LuceneMailboxWithLongNameErrorTest.java | 2 - .../MaildirMailboxWithLongNameErrorTest.java | 3 +- 10 files changed, 48 insertions(+), 1728 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/james-project/blob/ea545219/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxWithLongNameErrorTest.java ---------------------------------------------------------------------- diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxWithLongNameErrorTest.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxWithLongNameErrorTest.java index 83588dd..70ae98f 100644 --- a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxWithLongNameErrorTest.java +++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxWithLongNameErrorTest.java @@ -24,10 +24,8 @@ import org.apache.james.mpt.api.ImapHostSystem; import org.apache.james.mpt.imapmailbox.cassandra.host.CassandraHostSystemRule; import org.apache.james.mpt.imapmailbox.suite.MailboxWithLongNameError; import org.junit.ClassRule; -import org.junit.Ignore; import org.junit.Rule; -@Ignore("JAMES-2514 Cassandra 3.0 supports long mailbox names") public class CassandraMailboxWithLongNameErrorTest extends MailboxWithLongNameError { @ClassRule public static DockerCassandraRule cassandraServer = new DockerCassandraRule(); http://git-wip-us.apache.org/repos/asf/james-project/blob/ea545219/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameError.java ---------------------------------------------------------------------- diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameError.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameError.java index 4d0d154..9cb4163 100644 --- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameError.java +++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameError.java @@ -31,14 +31,12 @@ import org.junit.Test; public abstract class MailboxWithLongNameError implements ImapTestConstants { protected abstract ImapHostSystem createImapHostSystem(); - - private ImapHostSystem system; + private SimpleScriptedTestProtocol simpleScriptedTestProtocol; @Before public void setUp() throws Exception { - system = createImapHostSystem(); - simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system) + simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", createImapHostSystem()) .withUser(USER, PASSWORD) .withLocale(Locale.US); BasicImapCommands.welcome(simpleScriptedTestProtocol); http://git-wip-us.apache.org/repos/asf/james-project/blob/ea545219/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameSuccess.java ---------------------------------------------------------------------- diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameSuccess.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameSuccess.java deleted file mode 100644 index 8366ea1..0000000 --- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameSuccess.java +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************** - * Licensed to the Apache Software Foundation (ASF) under one * - * or more contributor license agreements. See the NOTICE file * - * distributed with this work for additional information * - * regarding copyright ownership. The ASF licenses this file * - * to you under the Apache License, Version 2.0 (the * - * "License"); you may not use this file except in compliance * - * with the License. You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, * - * software distributed under the License is distributed on an * - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * - * KIND, either express or implied. See the License for the * - * specific language governing permissions and limitations * - * under the License. * - ****************************************************************/ - -package org.apache.james.mpt.imapmailbox.suite; - -import java.util.Locale; - -import org.apache.james.mpt.api.ImapHostSystem; -import org.apache.james.mpt.imapmailbox.ImapTestConstants; -import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands; -import org.apache.james.mpt.script.SimpleScriptedTestProtocol; -import org.junit.Before; -import org.junit.Test; - -public abstract class MailboxWithLongNameSuccess implements ImapTestConstants { - - protected abstract ImapHostSystem createImapHostSystem(); - - private ImapHostSystem system; - private SimpleScriptedTestProtocol simpleScriptedTestProtocol; - - @Before - public void setUp() throws Exception { - system = createImapHostSystem(); - simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system) - .withUser(USER, PASSWORD) - .withLocale(Locale.US); - BasicImapCommands.welcome(simpleScriptedTestProtocol); - BasicImapCommands.authenticate(simpleScriptedTestProtocol); - } - - @Test - public void testWithLongMailboxNameUS() throws Exception { - simpleScriptedTestProtocol - .withLocale(Locale.US) - .run("CreateSuccessWithLongName"); - } - -} --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
