From ed0faba01b26579e726f5a2d3cf5efb14140322c Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 31 May 2016 15:44:43 +0200 Subject: ImapMailSyncTest --- .../data/1365777830.R28.localhost.localdomain:2,S | 72 ++++++++++++++++++++++ examples/imapresource/tests/imapmailsynctest.cpp | 27 ++++++-- examples/imapresource/tests/resetmailbox.sh | 3 +- 3 files changed, 96 insertions(+), 6 deletions(-) create mode 100644 examples/imapresource/tests/data/1365777830.R28.localhost.localdomain:2,S 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 @@ +Return-Path: +Received: from compute4.internal (compute4.nyi.mail.srv.osa [10.202.2.44]) + by slots3a1p1 (Cyrus git2.5+0-git-fastmail-8998) with LMTPA; + Mon, 11 Mar 2013 14:28:42 -0400 +X-Sieve: CMU Sieve 2.4 +X-Spam-score: 0.0 +X-Spam-hits: BAYES_00 -1.9, RCVD_IN_DNSWL_MED -2.3, RP_MATCHES_RCVD -0.704, + LANGUAGES unknown, BAYES_USED global, SA_VERSION 3.3.1 +X-Spam-source: IP='46.4.96.248', Host='postbox.kde.org', Country='unk', FromHeader='org', + MailFrom='org' +X-Spam-charsets: plain='us-ascii' +X-Resolved-to: chrigi_1@fastmail.fm +X-Delivered-to: chrigi_1@fastmail.fm +X-Mail-from: nepomuk-bounces@kde.org +Received: from mx4.nyi.mail.srv.osa ([10.202.2.203]) + by compute4.internal (LMTPProxy); Mon, 11 Mar 2013 14:28:42 -0400 +Received: from postbox.kde.org (postbox.kde.org [46.4.96.248]) + by mx4.messagingengine.com (Postfix) with ESMTP id 1C9D2440F88 + for ; Mon, 11 Mar 2013 14:28:42 -0400 (EDT) +Received: from postbox.kde.org (localhost [IPv6:::1]) + by postbox.kde.org (Postfix) with ESMTP id 00FFEB3732B; + Mon, 11 Mar 2013 18:28:40 +0000 (UTC) +DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=kde.org; s=default; + t=1363026520; bh=cOdvyBAJJ8ho64q0H7rxkl+cB2y6TiyVOX0fO3yZ64U=; + h=Date:From:To:Message-ID:In-Reply-To:References:MIME-Version: + Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help: + List-Subscribe:Content-Type:Content-Transfer-Encoding:Sender; b=dv + dJAFu+6JCuNun5WIuP4ysfKpLh0DeuhEEfy2cQavUGMICJ27k7tI73x6gN37V5Q/evJ + NDFna3/IhNBsAQeLiXs28HKxzcVhbnq5jdFR6fbyo6k1fOKt5vTT1GTDZ+3zIGPD1CU + ioDBGxPb/Ds6gee90tjadOj6o+Oc+2ZSq94= +X-Original-To: nepomuk@kde.org +X-Remote-Delivered-To: nepomuk@localhost.kde.org +Received: from build.kde.org (build.kde.org [IPv6:2a01:4f8:160:9363::5]) + by postbox.kde.org (Postfix) with ESMTP id 4491CB3732B + for ; Mon, 11 Mar 2013 18:28:27 +0000 (UTC) +Received: from localhost ([127.0.0.1]) by build.kde.org with esmtp (Exim 4.72) + (envelope-from ) id 1UF7SV-0000gs-11 + for nepomuk@kde.org; Mon, 11 Mar 2013 18:28:27 +0000 +Date: Mon, 11 Mar 2013 18:28:27 +0000 (UTC) +From: KDE CI System +To: nepomuk@kde.org +Message-ID: <1977027405.27.1363026507008.JavaMail.jenkins@build> +In-Reply-To: <880663748.26.1363026023717.JavaMail.jenkins@build> +References: <880663748.26.1363026023717.JavaMail.jenkins@build> +MIME-Version: 1.0 +X-Jenkins-Job: nepomuk-core_stable +X-Jenkins-Result: UNSTABLE +X-Scanned-By: MIMEDefang 2.71 on 46.4.96.248 +Subject: [Nepomuk] Jenkins build is still unstable: nepomuk-core_stable #158 +X-BeenThere: nepomuk@kde.org +X-Mailman-Version: 2.1.14 +Precedence: list +List-Id: The Semantic KDE +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +Content-Type: text/plain; charset="us-ascii" +Content-Transfer-Encoding: 7bit +Errors-To: nepomuk-bounces@kde.org +Sender: nepomuk-bounces@kde.org +X-Truedomain: NotChecked + +See + +_______________________________________________ +Nepomuk mailing list +Nepomuk@kde.org +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 @@ +/* + * Copyright (C) 2016 Christian Mollekopf + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ #include #include @@ -64,18 +82,19 @@ protected: VERIFYEXEC(imap.remove("INBOX." + folderPath.join('.'))); } - void createMessage(const QStringList &folderPath, const QByteArray &message) Q_DECL_OVERRIDE + QByteArray createMessage(const QStringList &folderPath, const QByteArray &message) Q_DECL_OVERRIDE { Imap::ImapServerProxy imap("localhost", 993); - VERIFYEXEC(imap.login("doe", "doe")); - VERIFYEXEC(imap.append("INBOX." + folderPath.join('.'), message)); + imap.login("doe", "doe").exec().waitForFinished(); + imap.append("INBOX." + folderPath.join('.'), message).exec().waitForFinished(); + return "2:*"; } void removeMessage(const QStringList &folderPath, const QByteArray &messages) Q_DECL_OVERRIDE { Imap::ImapServerProxy imap("localhost", 993); VERIFYEXEC(imap.login("doe", "doe")); - VERIFYEXEC(imap.remove("INBOX." + folderPath.join('.'), "2:*")); + VERIFYEXEC(imap.remove("INBOX." + folderPath.join('.'), messages)); } }; 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 sudo echo "dm user.doe.*" | cyradm --auth PLAIN -u cyrus -w admin localhost sudo echo "cm user.doe.test" | cyradm --auth PLAIN -u cyrus -w admin localhost sudo echo "sam user.doe cyrus c" | cyradm --auth PLAIN -u cyrus -w admin localhost -# sudo rm -R /var/spool/imap/d/user/doe/* -sudo cp /work/source/Sink/tests/data/maildir1/cur/1365777830.R28.localhost.localdomain\:2\,S /var/spool/imap/d/user/doe/test/1. +sudo cp /work/source/Sink/examples/imapresource/tests/data/1365777830.R28.localhost.localdomain\:2\,S /var/spool/imap/d/user/doe/test/1. sudo chown cyrus:mail /var/spool/imap/d/user/doe/test/1. sudo /usr/lib/cyrus-imapd/reconstruct "user.doe.test" -- cgit v1.2.3