You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by ma...@apache.org on 2019/07/10 09:15:40 UTC
[james-project] branch master updated: JAMES-2787 Add depolyement
test for IMAP FETCH with existing messages
This is an automated email from the ASF dual-hosted git repository.
matthieu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git
The following commit(s) were added to refs/heads/master by this push:
new 4c669fa JAMES-2787 Add depolyement test for IMAP FETCH with existing messages
4c669fa is described below
commit 4c669fa5968eca92fbd738e8d2ccb39061d889fa
Author: Gautier DI FOLCO <gd...@linagora.com>
AuthorDate: Tue Jun 11 14:17:54 2019 +0200
JAMES-2787 Add depolyement test for IMAP FETCH with existing messages
---
.../external/james/DeploymentValidation.java | 5 ++
.../SelectThenFetchWithExistingMessages.test | 53 ++++++++++++++++++++++
2 files changed, 58 insertions(+)
diff --git a/mpt/impl/imap-mailbox/external-james/src/test/java/org/apache/james/mpt/imapmailbox/external/james/DeploymentValidation.java b/mpt/impl/imap-mailbox/external-james/src/test/java/org/apache/james/mpt/imapmailbox/external/james/DeploymentValidation.java
index 2c01407..b42edcf 100644
--- a/mpt/impl/imap-mailbox/external-james/src/test/java/org/apache/james/mpt/imapmailbox/external/james/DeploymentValidation.java
+++ b/mpt/impl/imap-mailbox/external-james/src/test/java/org/apache/james/mpt/imapmailbox/external/james/DeploymentValidation.java
@@ -82,6 +82,11 @@ public abstract class DeploymentValidation {
}
@Test
+ public void selectThenFetchWithExistingMessages() throws Exception {
+ simpleScriptedTestProtocol.run("SelectThenFetchWithExistingMessages");
+ }
+
+ @Test
public void validateDeploymentWithMailsFromSmtp() throws Exception {
SMTPMessageSender smtpMessageSender = new SMTPMessageSender("another-domain");
smtpSystem.connect(smtpMessageSender).sendMessage("test@" + DOMAIN, USER_ADDRESS);
diff --git a/mpt/impl/imap-mailbox/external-james/src/test/resources/org/apache/james/imap/scripts/SelectThenFetchWithExistingMessages.test b/mpt/impl/imap-mailbox/external-james/src/test/resources/org/apache/james/imap/scripts/SelectThenFetchWithExistingMessages.test
new file mode 100644
index 0000000..1abc21e
--- /dev/null
+++ b/mpt/impl/imap-mailbox/external-james/src/test/resources/org/apache/james/imap/scripts/SelectThenFetchWithExistingMessages.test
@@ -0,0 +1,53 @@
+################################################################
+# 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. #
+################################################################
+
+S: \* OK IMAP4rev1 Server ready
+
+C: A01 LOGIN imapuser@domain password
+S: A01 OK LOGIN completed\.
+
+C: A02 CREATE selectTest
+S: A02 OK CREATE completed\.
+
+C: A03 SELECT selectTest
+S: \* FLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen\)
+S: \* \d+ EXISTS
+S: \* \d+ RECENT
+S: \* OK \[UIDVALIDITY \d+\].*
+S: \* OK \[PERMANENTFLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\\Seen( \\\*)?\)\].*
+S: \* OK \[HIGHESTMODSEQ \d+\].*
+S: \* OK \[UIDNEXT 1\].*
+S: A03 OK \[READ-WRITE\] SELECT completed\.
+
+C: A04 APPEND selectTest (\Flagged) {93+}
+C: From: expeditor@example.com
+C: To: recipient@example.com
+C: Subject: test subject
+C:
+C: Test content
+S: \* 1 EXISTS
+S: \* 1 RECENT
+S: A04 OK (\[.+\] )?APPEND completed\.
+
+C: A05 FETCH *:* (BODY UID)
+S: \* 1 FETCH \(BODY \("TEXT" "PLAIN" \("charset" "us-ascii"\) NIL NIL "7BIT" 12 0\) UID 1\)
+S: A05 OK FETCH completed\.
+
+C: A06 DELETE selectTest
+S: A06 OK DELETE completed\.
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org