From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id oOgwLUcNRWAiUwAA0tVLHw (envelope-from ) for ; Sun, 07 Mar 2021 17:28:39 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 6MYiKUcNRWD8YwAAB5/wlQ (envelope-from ) for ; Sun, 07 Mar 2021 17:28: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 aspmx1.migadu.com (Postfix) with ESMTPS id 5CE4D24684 for ; Sun, 7 Mar 2021 18:28:39 +0100 (CET) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id AB0D527E54; Sun, 7 Mar 2021 12:28:06 -0500 (EST) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id CEFF227C5F for ; Sun, 7 Mar 2021 12:27:48 -0500 (EST) Received: by fethera.tethera.net (Postfix, from userid 1001) id C6C7A5FA96; Sun, 7 Mar 2021 12:27:48 -0500 (EST) Received: (nullmailer pid 1091632 invoked by uid 1000); Sun, 07 Mar 2021 17:27:38 -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: Sun, 7 Mar 2021 13:27:13 -0400 Message-Id: <20210307172734.1091264-2-david@tethera.net> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210307172734.1091264-1-david@tethera.net> References: <20210307172734.1091264-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: ZTEG5MCXYAE2O67BUYPDQR7RYRRRM46Y X-Message-ID-Hash: ZTEG5MCXYAE2O67BUYPDQR7RYRRRM46Y 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=1615138119; 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=S7FdpkJqPKLtRpA5xGrpk+8+5+bZhI7czBc2ATuBal/jnv5R63f9Okf/rUgZAT4WwrT1fu aOWi54ByYk61GNYuuCWgi4QoplgbYzSTwmJKFgF2/jQ0riVuil76phXr6lrnEIUOMkEFPQ yOfesm9uyQy6+3Ronb5fjRPNdxx82Zm9vqGRPabDwOO+eZpGg/ISdOlTTtHynuowIt8Cw6 RZqft9c2uLC8GRhDreiIo1uweLBFtSFFYh5W/V7H1vKrSLCZDGn0enJ3/x07UCAxiQyt7m Ehn6j3GeeP0oivVGktMCXzcr8KGQAq41Y4BQ+Eqfz5+johPGo9BQ4KaINHMy9w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1615138119; a=rsa-sha256; cv=none; b=qaUrS9pmhBAtuzxsqYfApwIcNaTGDfZf0tpmjCc4eC3ePl3yP5uidXDRlY8HM+daj9KXhe X26k2wCLmi8q/fBkNgYQQorSVHX4y/OsQrRsn9/Hf96OO8sfoNsiz8QqIWhfGCvKL9twMB Yxhn2QeSM7moulWVJQ6foublz8qAcwUYRjQB/Y2uBHxEjU8fA5XUFPtUa8OKM/11oy4BtH yzkCldMLU0DDAx0MRk2X0s+15+Db897PkkelkJp8h8H1akIBFzM3s9PPB5dyB1OdMM8shH gbJMaoa8LBkIM+NwR1CAmDM739/EwPepGL5rmTfUvVkhlkwmay6vE3bx2xQ1/Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.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: -1.08 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.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: 5CE4D24684 X-Spam-Score: -1.08 X-Migadu-Scanner: scn0.migadu.com X-TUID: yJTDfXOJJaQE 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