From 02574e0304f131929945d90a53523f2e591da3d6 Mon Sep 17 00:00:00 2001 From: Dmitry Kurochkin Date: Tue, 31 Jan 2012 02:06:34 +0400 Subject: [PATCH] [PATCH 1/2] test: remove "Generate some messages" test from raw --- 66/010591636e1d8605508708caa0cf12ea3bcab7 | 103 ++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 66/010591636e1d8605508708caa0cf12ea3bcab7 diff --git a/66/010591636e1d8605508708caa0cf12ea3bcab7 b/66/010591636e1d8605508708caa0cf12ea3bcab7 new file mode 100644 index 000000000..404c31487 --- /dev/null +++ b/66/010591636e1d8605508708caa0cf12ea3bcab7 @@ -0,0 +1,103 @@ +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 941AB431E64 + for ; Mon, 30 Jan 2012 14:07:49 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.799 +X-Spam-Level: +X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 bcFJjFIxyPu8 for ; + Mon, 30 Jan 2012 14:07:49 -0800 (PST) +Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com + [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id DA9A6431FBC + for ; Mon, 30 Jan 2012 14:07:48 -0800 (PST) +Received: by bke11 with SMTP id 11so1911694bke.26 + for ; Mon, 30 Jan 2012 14:07:47 -0800 (PST) +Received-SPF: pass (google.com: domain of dmitry.kurochkin@gmail.com + designates 10.204.157.25 as permitted sender) + client-ip=10.204.157.25; +Authentication-Results: mr.google.com; spf=pass (google.com: domain of + dmitry.kurochkin@gmail.com designates 10.204.157.25 as + permitted sender) smtp.mail=dmitry.kurochkin@gmail.com; + dkim=pass header.i=dmitry.kurochkin@gmail.com +Received: from mr.google.com ([10.204.157.25]) + by 10.204.157.25 with SMTP id z25mr10576111bkw.25.1327961267590 + (num_hops = 1); Mon, 30 Jan 2012 14:07:47 -0800 (PST) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; + h=from:to:subject:date:message-id:x-mailer; + bh=sSHzwFaGTzED7MrQFyVNTKWKc4t5LH0H+F8AtuNNCtU=; + b=oWl0xQtPCSmhTkn7xIKSyk6jbqmRgO7411WimUN2WboxOaX8zzl3DL5OQ9V8q8LzTI + J1pFXmaXj5QEAREqyc+VTOLgUtw6s6qMLzudQqSF94ODRQWdgvzfc9EMtGu6AjjVfCN6 + 6yNYCMt4jABOW49vRJPPD5k/3F58xZ0m6aQK0= +Received: by 10.204.157.25 with SMTP id z25mr9190633bkw.25.1327961267490; + Mon, 30 Jan 2012 14:07:47 -0800 (PST) +Received: from localhost ([91.144.186.21]) + by mx.google.com with ESMTPS id cg2sm40505272bkb.12.2012.01.30.14.07.46 + (version=TLSv1/SSLv3 cipher=OTHER); + Mon, 30 Jan 2012 14:07:46 -0800 (PST) +From: Dmitry Kurochkin +To: notmuch@notmuchmail.org +Subject: [PATCH 1/2] test: remove "Generate some messages" test from raw +Date: Tue, 31 Jan 2012 02:06:34 +0400 +Message-Id: <1327961195-4204-1-git-send-email-dmitry.kurochkin@gmail.com> +X-Mailer: git-send-email 1.7.8.3 +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: Mon, 30 Jan 2012 22:07:49 -0000 + +Before the change, the first subtest in raw format tests just +generated messages and checked that they are added successfully. This +is not really a raw format test, it is creating of environment +required for other subtests to run. The patch removes the first +subtest from raw and replaces it with bare add_message calls, similar +to how it is done in other tests. + +TODO: we should check that test environment was created successfully. +Currently, many tests do add_message(), notmuch new and other calls +without checking the results. We should come up with a general +solution for this, i.e. if any command during test initialization +fails, all tests should be skipped with appropriate error message. +--- + test/raw | 7 ++----- + 1 files changed, 2 insertions(+), 5 deletions(-) + +diff --git a/test/raw b/test/raw +index 0171e64..de0b867 100755 +--- a/test/raw ++++ b/test/raw +@@ -3,11 +3,8 @@ + test_description='notmuch show --format=raw' + . ./test-lib.sh + +-test_begin_subtest "Generate some messages" +-generate_message +-generate_message +-output=$(NOTMUCH_NEW) +-test_expect_equal "$output" "Added 2 new messages to the database." ++add_message ++add_message + + test_begin_subtest "Attempt to show multiple raw messages" + output=$(notmuch show --format=raw "*" 2>&1) +-- +1.7.8.3 + -- 2.26.2