From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id OBj1HnfhQGAbLQAA0tVLHw (envelope-from ) for ; Thu, 04 Mar 2021 13:32:39 +0000 Received: from aspmx2.migadu.com ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id iOyiGnfhQGC5AgAAbx9fmQ (envelope-from ) for ; Thu, 04 Mar 2021 13:32:39 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx2.migadu.com (Postfix) with ESMTPS id 3F2CD25E50 for ; Thu, 4 Mar 2021 14:32:38 +0100 (CET) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id CF01927C76; Thu, 4 Mar 2021 08:31:59 -0500 (EST) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 4AEAF27579 for ; Thu, 4 Mar 2021 08:31:41 -0500 (EST) Received: by fethera.tethera.net (Postfix, from userid 1001) id 421BA5FA96; Thu, 4 Mar 2021 08:31:41 -0500 (EST) Received: (nullmailer pid 4053542 invoked by uid 1000); Thu, 04 Mar 2021 13:31:28 -0000 From: David Bremner To: notmuch@notmuchmail.org Cc: David Bremner Subject: [PATCH 01/22] test/setup: add check for config exists, but no database. Date: Thu, 4 Mar 2021 09:31:04 -0400 Message-Id: <20210304133125.4050229-2-david@tethera.net> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210304133125.4050229-1-david@tethera.net> References: <20210304133125.4050229-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: JOL4BQER64TB25OO23QF3YFP73PCBV2O X-Message-ID-Hash: JOL4BQER64TB25OO23QF3YFP73PCBV2O X-MailFrom: bremner@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1614864758; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=j458RbXmyHaOpqsoEudBOYg8MsiiuCth8qfgzchvhuE=; b=IVQRPAKh3Olohvyd9jqYxJ/cZe0k7xIvxOIQPeSumBcekNl0oUH7zPfc+CPCKf9teBRa6t JFL8NNU0mqgb8aQUXiF8Wrd5CSOFuka4yc/+16eB7g1BhG90roLSze/nmlyukHNkSms2ui j/jtXNhms8r/GDOxK/X54tRUguZ9GIYJE1u3DnHlSO6QoIyqk6CeiwGbFxvhMN8lUH0wfN V1wN8+js46kJkt8SS0+b1xv7hYFVbt3Lnn8EobimzvuJT3gH9wuvid0Do6oA86zkyHhNDP wUr0ixbcS4gRTdVZWGvKAG3vqb7hJywlXuD5PN/DH5k0jhcbh9NpNcya+6v71Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1614864758; a=rsa-sha256; cv=none; b=N6+zNq9aheJzdWXkwhrKHI6uTPxK1Wfn7N/xCZkyOgXMheJi27HsWgICAEU/3C1VqpbQ6A aNWcP7TAMcNXjhIbZI6AehdM+iDV3PW3mRDqwSAdlzEyom2r7hOXrF+dYgJxusNU9OX6AQ nzDbCx04QE4hfEsmIC6xQGA9BI2ajqMkfQ+G/YZ+dhsHQoIWazjqEZ3Ae4LCm+9t+cYywN cWVWop9LpK+vHBq0YPNyoHGQKlHmRn0nHSIeVu4sk/Ca1gIPHMZXfRzS2IsVFCo5IrldvV xm74dNSyS2LijN1/2xfNnLcYvTLnPLzJOrYqYIYOsO23KA29CKoPSaF2cORZyw== ARC-Authentication-Results: i=1; aspmx2.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx2.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -0.88 Authentication-Results: aspmx2.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx2.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 3F2CD25E50 X-Spam-Score: -0.88 X-Migadu-Scanner: scn1.migadu.com X-TUID: JrCs7dfdFW+E This code path is not currently tested, and will need updating if the location of the xapian database changes. --- test/T040-setup.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/T040-setup.sh b/test/T040-setup.sh index 1223ebf7..5eb281d7 100755 --- a/test/T040-setup.sh +++ b/test/T040-setup.sh @@ -34,4 +34,20 @@ built_with.compact=something built_with.field_processor=something built_with.retry_lock=something" +test_begin_subtest "notmuch with a config but without a database suggests notmuch new" +notmuch 2>&1 | notmuch_dir_sanitize > OUTPUT +cat < EXPECTED +Notmuch is configured, but there's not yet a database at + + MAIL_DIR/.notmuch + +You probably want to run "notmuch new" now to create that database. + +Note that the first run of "notmuch new" can take a very long time +and that the resulting database will use roughly the same amount of +storage space as the email being indexed. + +EOF +test_expect_equal_file EXPECTED OUTPUT + test_done -- 2.30.1