Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 1B17B431FD4 for ; Thu, 23 Oct 2014 05:31:29 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.3 X-Spam-Level: X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qO6t+kRkwWEb for ; Thu, 23 Oct 2014 05:31:20 -0700 (PDT) Received: from dmz-mailsec-scanner-8.mit.edu (dmz-mailsec-scanner-8.mit.edu [18.7.68.37]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 48FD6429E26 for ; Thu, 23 Oct 2014 05:30:58 -0700 (PDT) X-AuditID: 12074425-f79e46d000002583-a5-5448f501dd64 Received: from mailhub-auth-1.mit.edu ( [18.9.21.35]) (using TLS with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by dmz-mailsec-scanner-8.mit.edu (Symantec Messaging Gateway) with SMTP id BD.F4.09603.105F8445; Thu, 23 Oct 2014 08:30:57 -0400 (EDT) Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id s9NCUtbY030367; Thu, 23 Oct 2014 08:30:55 -0400 Received: from drake.dyndns.org (216-15-114-40.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com [216.15.114.40]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s9NCUsKU008986 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Thu, 23 Oct 2014 08:30:54 -0400 Received: from amthrax by drake.dyndns.org with local (Exim 4.84) (envelope-from ) id 1XhHXU-0007c8-Ff; Thu, 23 Oct 2014 08:30:48 -0400 From: Austin Clements To: notmuch@notmuchmail.org Subject: [PATCH v3 8/9] test: Test upgrade to ghost messages feature Date: Thu, 23 Oct 2014 08:30:40 -0400 Message-Id: <1414067441-29054-9-git-send-email-aclements@csail.mit.edu> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1414067441-29054-1-git-send-email-aclements@csail.mit.edu> References: <1414067441-29054-1-git-send-email-aclements@csail.mit.edu> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrLIsWRmVeSWpSXmKPExsUixCmqrMv41SPE4NkCdYvVc3ksrt+cyezA 5LFz1l12j2erbjEHMEVx2aSk5mSWpRbp2yVwZRz+d4m94BhXRXdHK3MD43uOLkZODgkBE4kr O14yQ9hiEhfurWfrYuTiEBKYzSSxcfF5RghnI6PEqqVT2SGcO0wSt+88ZIVwljBK7J/7Bqyf TUBfYsXaSawgtoiAtMTOu7PBbGYBD4kpra/AbGEBF4kzD7awgNgsAqoSZz++BbN5Bdwlvuz9 xwRxh5zEht3/GUFsTqDePTvusIHYQkA1258fZJ3AyL+AkWEVo2xKbpVubmJmTnFqsm5xcmJe XmqRroVebmaJXmpK6SZGUCixu6juYJxwSOkQowAHoxIP74VUjxAh1sSy4srcQ4ySHExKorwx D4BCfEn5KZUZicUZ8UWlOanFhxglOJiVRHjjLwDleFMSK6tSi/JhUtIcLErivJt+8IUICaQn lqRmp6YWpBbBZGU4OJQkeBm/ADUKFqWmp1akZeaUIKSZODhBhvMADb/1GWR4cUFibnFmOkT+ FKOilDhvMkhCACSRUZoH1wuL9VeM4kCvCPOqgazgAaYJuO5XQIOZQK7eADa4JBEhJdXAmGaz qP/E3edha5KzzIWEr195dOqvTnzxQVO1urSPljcnf1NVMuetlPc6e++DvInBwvJlNTY3OZ+Z cIW/7MzwnLL1UdaLzlfrtoatffBoS0vXjs6SJ9PdFuxiY/jN2CK10MpaVTry+UGbT3q7604o hlhNXnjEe4qO7SWr+Z7CDz6YfcuTStXYosRSnJFoqMVcVJwIAFJdcx7QAgAA Cc: Austin Clements X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Oct 2014 12:31:29 -0000 --- test/T530-upgrade.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/test/T530-upgrade.sh b/test/T530-upgrade.sh index c4c4ac8..6b42a69 100755 --- a/test/T530-upgrade.sh +++ b/test/T530-upgrade.sh @@ -116,4 +116,25 @@ MAIL_DIR/bar/new/21:2, MAIL_DIR/bar/new/22:2, MAIL_DIR/cur/51:2," +# Ghost messages are difficult to test since they're nearly invisible. +# However, if the upgrade works correctly, the ghost message should +# retain the right thread ID even if all of the original messages in +# the thread are deleted. That's what we test. This won't detect if +# the upgrade just plain didn't happen, but it should detect if +# something went wrong. +test_begin_subtest "ghost message retains thread ID" +# Upgrade database +notmuch new +# Get thread ID of real message +thread=$(notmuch search --output=threads id:4EFC743A.3060609@april.org) +# Delete all real messages in that thread +rm $(notmuch search --output=files $thread) +notmuch new +# "Deliver" ghost message +add_message '[subject]=Ghost' '[id]=4EFC3931.6030007@april.org' +# If the ghost upgrade worked, the new message should be attached to +# the existing thread ID. +nthread=$(notmuch search --output=threads id:4EFC3931.6030007@april.org) +test_expect_equal "$thread" "$nthread" + test_done -- 2.1.0