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 1C134431FD5 for ; Fri, 3 Oct 2014 07:20:00 -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 XWSUxXJPR6xl for ; Fri, 3 Oct 2014 07:19:52 -0700 (PDT) Received: from dmz-mailsec-scanner-6.mit.edu (dmz-mailsec-scanner-6.mit.edu [18.7.68.35]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id EEAE4431FD8 for ; Fri, 3 Oct 2014 07:19:31 -0700 (PDT) X-AuditID: 12074423-f799d6d00000337c-fc-542eb0739b19 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) (using TLS with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by dmz-mailsec-scanner-6.mit.edu (Symantec Messaging Gateway) with SMTP id F4.B6.13180.370BE245; Fri, 3 Oct 2014 10:19:31 -0400 (EDT) Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id s93EJROL020229; Fri, 3 Oct 2014 10:19:28 -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 s93EJQbA023389 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Fri, 3 Oct 2014 10:19:27 -0400 Received: from amthrax by drake.dyndns.org with local (Exim 4.84) (envelope-from ) id 1Xa3hZ-0002KH-C2; Fri, 03 Oct 2014 10:19:21 -0400 From: Austin Clements To: notmuch@notmuchmail.org Subject: [PATCH 10/11] test: Test upgrade to ghost messages feature Date: Fri, 3 Oct 2014 10:19:17 -0400 Message-Id: <1412345958-8278-11-git-send-email-aclements@csail.mit.edu> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1412345958-8278-1-git-send-email-aclements@csail.mit.edu> References: <1412345958-8278-1-git-send-email-aclements@csail.mit.edu> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrMIsWRmVeSWpSXmKPExsUixG6nrlu8QS/EYP03CYvrN2cyOzB6PFt1 izmAMYrLJiU1J7MstUjfLoEr4/C/S+wFx7gqujtamRsY33N0MXJySAiYSPRd7mCBsMUkLtxb z9bFyMUhJDCbSWLH1etQzgZGiY3zNjFDOLeZJFa0XoPKLGGU+L7mBStIP5uAvsSKtZPAbBEB aYmdd2cD2RwczAK6Es3tyiBhYQFniScdU5lAbBYBVYkX/5oZQWxeAXeJafebGCHOkJPYsPs/ mM0JFL9w9ykbiC0k4Cax6lg32wRG/gWMDKsYZVNyq3RzEzNzilOTdYuTE/PyUot0zfRyM0v0 UlNKNzGCw8ZFeQfjn4NKhxgFOBiVeHg/3NANEWJNLCuuzD3EKMnBpCTKW7lYL0SILyk/pTIj sTgjvqg0J7X4EKMEB7OSCO+ClUA53pTEyqrUonyYlDQHi5I476YffCFCAumJJanZqakFqUUw WRkODiUJ3vb1QI2CRanpqRVpmTklCGkmDk6Q4TxAw8FqeIsLEnOLM9Mh8qcYFaXEeR+uA0oI gCQySvPgemFx/YpRHOgVYd4ukHYeYEqA634FNJgJaPA7e12QwSWJCCmpBkYvBoPySO2jVzy+ Va9sT/X7dunqrisrziT6tejqvI1I3ZH8/dmHdS5B34on1z7MimV+dnK6W6jj7+Arwb/X3c6t OaGu5cKzNanIJu56yUm/cv1527zKqx999V29OiC30l0oROr/zFeP+WSjrn3X3/WQs9ziV83X yqpNORwMhsvviEX6Taj+sUyJpTgj0VCLuag4EQBvxJvvxgIAAA== 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: Fri, 03 Oct 2014 14:20:00 -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