diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-05-31 15:44:43 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-05-31 15:44:43 +0200 |
commit | ed0faba01b26579e726f5a2d3cf5efb14140322c (patch) | |
tree | 1ff4465ef46149a58febcce0f900d0270f6c8c70 /examples/imapresource/tests | |
parent | 2061ba0cf16b6a0a3313f861f79b90cf2905efce (diff) | |
download | sink-ed0faba01b26579e726f5a2d3cf5efb14140322c.tar.gz sink-ed0faba01b26579e726f5a2d3cf5efb14140322c.zip |
ImapMailSyncTest
Diffstat (limited to 'examples/imapresource/tests')
3 files changed, 96 insertions, 6 deletions
diff --git a/examples/imapresource/tests/data/1365777830.R28.localhost.localdomain:2,S b/examples/imapresource/tests/data/1365777830.R28.localhost.localdomain:2,S new file mode 100644 index 0000000..91231b5 --- /dev/null +++ b/examples/imapresource/tests/data/1365777830.R28.localhost.localdomain:2,S | |||
@@ -0,0 +1,72 @@ | |||
1 | Return-Path: <nepomuk-bounces@kde.org> | ||
2 | Received: from compute4.internal (compute4.nyi.mail.srv.osa [10.202.2.44]) | ||
3 | by slots3a1p1 (Cyrus git2.5+0-git-fastmail-8998) with LMTPA; | ||
4 | Mon, 11 Mar 2013 14:28:42 -0400 | ||
5 | X-Sieve: CMU Sieve 2.4 | ||
6 | X-Spam-score: 0.0 | ||
7 | X-Spam-hits: BAYES_00 -1.9, RCVD_IN_DNSWL_MED -2.3, RP_MATCHES_RCVD -0.704, | ||
8 | LANGUAGES unknown, BAYES_USED global, SA_VERSION 3.3.1 | ||
9 | X-Spam-source: IP='46.4.96.248', Host='postbox.kde.org', Country='unk', FromHeader='org', | ||
10 | MailFrom='org' | ||
11 | X-Spam-charsets: plain='us-ascii' | ||
12 | X-Resolved-to: chrigi_1@fastmail.fm | ||
13 | X-Delivered-to: chrigi_1@fastmail.fm | ||
14 | X-Mail-from: nepomuk-bounces@kde.org | ||
15 | Received: from mx4.nyi.mail.srv.osa ([10.202.2.203]) | ||
16 | by compute4.internal (LMTPProxy); Mon, 11 Mar 2013 14:28:42 -0400 | ||
17 | Received: from postbox.kde.org (postbox.kde.org [46.4.96.248]) | ||
18 | by mx4.messagingengine.com (Postfix) with ESMTP id 1C9D2440F88 | ||
19 | for <chrigi_1@fastmail.fm>; Mon, 11 Mar 2013 14:28:42 -0400 (EDT) | ||
20 | Received: from postbox.kde.org (localhost [IPv6:::1]) | ||
21 | by postbox.kde.org (Postfix) with ESMTP id 00FFEB3732B; | ||
22 | Mon, 11 Mar 2013 18:28:40 +0000 (UTC) | ||
23 | DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=kde.org; s=default; | ||
24 | t=1363026520; bh=cOdvyBAJJ8ho64q0H7rxkl+cB2y6TiyVOX0fO3yZ64U=; | ||
25 | h=Date:From:To:Message-ID:In-Reply-To:References:MIME-Version: | ||
26 | Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help: | ||
27 | List-Subscribe:Content-Type:Content-Transfer-Encoding:Sender; b=dv | ||
28 | dJAFu+6JCuNun5WIuP4ysfKpLh0DeuhEEfy2cQavUGMICJ27k7tI73x6gN37V5Q/evJ | ||
29 | NDFna3/IhNBsAQeLiXs28HKxzcVhbnq5jdFR6fbyo6k1fOKt5vTT1GTDZ+3zIGPD1CU | ||
30 | ioDBGxPb/Ds6gee90tjadOj6o+Oc+2ZSq94= | ||
31 | X-Original-To: nepomuk@kde.org | ||
32 | X-Remote-Delivered-To: nepomuk@localhost.kde.org | ||
33 | Received: from build.kde.org (build.kde.org [IPv6:2a01:4f8:160:9363::5]) | ||
34 | by postbox.kde.org (Postfix) with ESMTP id 4491CB3732B | ||
35 | for <nepomuk@kde.org>; Mon, 11 Mar 2013 18:28:27 +0000 (UTC) | ||
36 | Received: from localhost ([127.0.0.1]) by build.kde.org with esmtp (Exim 4.72) | ||
37 | (envelope-from <null@kde.org>) id 1UF7SV-0000gs-11 | ||
38 | for nepomuk@kde.org; Mon, 11 Mar 2013 18:28:27 +0000 | ||
39 | Date: Mon, 11 Mar 2013 18:28:27 +0000 (UTC) | ||
40 | From: KDE CI System <null@kde.org> | ||
41 | To: nepomuk@kde.org | ||
42 | Message-ID: <1977027405.27.1363026507008.JavaMail.jenkins@build> | ||
43 | In-Reply-To: <880663748.26.1363026023717.JavaMail.jenkins@build> | ||
44 | References: <880663748.26.1363026023717.JavaMail.jenkins@build> | ||
45 | MIME-Version: 1.0 | ||
46 | X-Jenkins-Job: nepomuk-core_stable | ||
47 | X-Jenkins-Result: UNSTABLE | ||
48 | X-Scanned-By: MIMEDefang 2.71 on 46.4.96.248 | ||
49 | Subject: [Nepomuk] Jenkins build is still unstable: nepomuk-core_stable #158 | ||
50 | X-BeenThere: nepomuk@kde.org | ||
51 | X-Mailman-Version: 2.1.14 | ||
52 | Precedence: list | ||
53 | List-Id: The Semantic KDE <nepomuk.kde.org> | ||
54 | List-Unsubscribe: <https://mail.kde.org/mailman/options/nepomuk>, | ||
55 | <mailto:nepomuk-request@kde.org?subject=unsubscribe> | ||
56 | List-Archive: <http://mail.kde.org/pipermail/nepomuk> | ||
57 | List-Post: <mailto:nepomuk@kde.org> | ||
58 | List-Help: <mailto:nepomuk-request@kde.org?subject=help> | ||
59 | List-Subscribe: <https://mail.kde.org/mailman/listinfo/nepomuk>, | ||
60 | <mailto:nepomuk-request@kde.org?subject=subscribe> | ||
61 | Content-Type: text/plain; charset="us-ascii" | ||
62 | Content-Transfer-Encoding: 7bit | ||
63 | Errors-To: nepomuk-bounces@kde.org | ||
64 | Sender: nepomuk-bounces@kde.org | ||
65 | X-Truedomain: NotChecked | ||
66 | |||
67 | See <http://build.kde.org/job/nepomuk-core_stable/changes> | ||
68 | |||
69 | _______________________________________________ | ||
70 | Nepomuk mailing list | ||
71 | Nepomuk@kde.org | ||
72 | https://mail.kde.org/mailman/listinfo/nepomuk | ||
diff --git a/examples/imapresource/tests/imapmailsynctest.cpp b/examples/imapresource/tests/imapmailsynctest.cpp index c73c840..b0d5b22 100644 --- a/examples/imapresource/tests/imapmailsynctest.cpp +++ b/examples/imapresource/tests/imapmailsynctest.cpp | |||
@@ -1,3 +1,21 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2016 Christian Mollekopf <chrigi_1@fastmail.fm> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the | ||
16 | * Free Software Foundation, Inc., | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
18 | */ | ||
1 | #include <QtTest> | 19 | #include <QtTest> |
2 | 20 | ||
3 | #include <tests/mailsynctest.h> | 21 | #include <tests/mailsynctest.h> |
@@ -64,18 +82,19 @@ protected: | |||
64 | VERIFYEXEC(imap.remove("INBOX." + folderPath.join('.'))); | 82 | VERIFYEXEC(imap.remove("INBOX." + folderPath.join('.'))); |
65 | } | 83 | } |
66 | 84 | ||
67 | void createMessage(const QStringList &folderPath, const QByteArray &message) Q_DECL_OVERRIDE | 85 | QByteArray createMessage(const QStringList &folderPath, const QByteArray &message) Q_DECL_OVERRIDE |
68 | { | 86 | { |
69 | Imap::ImapServerProxy imap("localhost", 993); | 87 | Imap::ImapServerProxy imap("localhost", 993); |
70 | VERIFYEXEC(imap.login("doe", "doe")); | 88 | imap.login("doe", "doe").exec().waitForFinished(); |
71 | VERIFYEXEC(imap.append("INBOX." + folderPath.join('.'), message)); | 89 | imap.append("INBOX." + folderPath.join('.'), message).exec().waitForFinished(); |
90 | return "2:*"; | ||
72 | } | 91 | } |
73 | 92 | ||
74 | void removeMessage(const QStringList &folderPath, const QByteArray &messages) Q_DECL_OVERRIDE | 93 | void removeMessage(const QStringList &folderPath, const QByteArray &messages) Q_DECL_OVERRIDE |
75 | { | 94 | { |
76 | Imap::ImapServerProxy imap("localhost", 993); | 95 | Imap::ImapServerProxy imap("localhost", 993); |
77 | VERIFYEXEC(imap.login("doe", "doe")); | 96 | VERIFYEXEC(imap.login("doe", "doe")); |
78 | VERIFYEXEC(imap.remove("INBOX." + folderPath.join('.'), "2:*")); | 97 | VERIFYEXEC(imap.remove("INBOX." + folderPath.join('.'), messages)); |
79 | } | 98 | } |
80 | }; | 99 | }; |
81 | 100 | ||
diff --git a/examples/imapresource/tests/resetmailbox.sh b/examples/imapresource/tests/resetmailbox.sh index fc78f60..5e52d6f 100644 --- a/examples/imapresource/tests/resetmailbox.sh +++ b/examples/imapresource/tests/resetmailbox.sh | |||
@@ -4,7 +4,6 @@ sudo echo "sam user.doe.* cyrus c" | cyradm --auth PLAIN -u cyrus -w admin local | |||
4 | sudo echo "dm user.doe.*" | cyradm --auth PLAIN -u cyrus -w admin localhost | 4 | sudo echo "dm user.doe.*" | cyradm --auth PLAIN -u cyrus -w admin localhost |
5 | sudo echo "cm user.doe.test" | cyradm --auth PLAIN -u cyrus -w admin localhost | 5 | sudo echo "cm user.doe.test" | cyradm --auth PLAIN -u cyrus -w admin localhost |
6 | sudo echo "sam user.doe cyrus c" | cyradm --auth PLAIN -u cyrus -w admin localhost | 6 | sudo echo "sam user.doe cyrus c" | cyradm --auth PLAIN -u cyrus -w admin localhost |
7 | # sudo rm -R /var/spool/imap/d/user/doe/* | 7 | sudo cp /work/source/Sink/examples/imapresource/tests/data/1365777830.R28.localhost.localdomain\:2\,S /var/spool/imap/d/user/doe/test/1. |
8 | sudo cp /work/source/Sink/tests/data/maildir1/cur/1365777830.R28.localhost.localdomain\:2\,S /var/spool/imap/d/user/doe/test/1. | ||
9 | sudo chown cyrus:mail /var/spool/imap/d/user/doe/test/1. | 8 | sudo chown cyrus:mail /var/spool/imap/d/user/doe/test/1. |
10 | sudo /usr/lib/cyrus-imapd/reconstruct "user.doe.test" | 9 | sudo /usr/lib/cyrus-imapd/reconstruct "user.doe.test" |