From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 7B6B21FB0F for ; Thu, 25 Mar 2021 04:20:27 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 06/10] t/*: drop unnecessary v1-specific index calls Date: Thu, 25 Mar 2021 06:20:22 +0200 Message-Id: <20210325042026.11270-7-e@80x24.org> In-Reply-To: <20210325042026.11270-1-e@80x24.org> References: <20210325042026.11270-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Outside of mirrors, we can -init with indexlevel to avoid calling -index explicitly. --- t/inbox_idle.t | 2 -- t/nntpd.t | 4 ---- t/v2mda.t | 4 ---- t/watch_filter_rubylang.t | 7 ++----- 4 files changed, 2 insertions(+), 15 deletions(-) diff --git a/t/inbox_idle.t b/t/inbox_idle.t index c9df73a1..51379764 100644 --- a/t/inbox_idle.t +++ b/t/inbox_idle.t @@ -42,13 +42,11 @@ EOF my $im = $ibx->importer(0); ok($im->add(eml_load('t/utf8.eml')), "$V added"); $im->done; - PublicInbox::SearchIdx->new($ibx)->index_sync if $V == 1; $ii->event_step; is(scalar @{$obj->{called}}, 1, 'called on unlock'); $pi_cfg->each_inbox(sub { shift->unsubscribe_unlock($ident) }); ok($im->add(eml_load('t/data/0001.patch')), "$V added #2"); $im->done; - PublicInbox::SearchIdx->new($ibx)->index_sync if $V == 1; $ii->event_step; is(scalar @{$obj->{called}}, 1, 'not called when unsubbed'); $ii->close; diff --git a/t/nntpd.t b/t/nntpd.t index ce4d7cf9..67205fe5 100644 --- a/t/nntpd.t +++ b/t/nntpd.t @@ -253,10 +253,6 @@ Date: Fri, 02 Oct 1993 00:00:00 +0000 my $im = $ibx->importer(0); $im->add($for_leafnode); $im->done; - if ($version == 1) { - ok(run_script(['-index', $ibx->{inboxdir}]), - 'indexed v1'); - } my $hdr = $n->head("<$long_hdr>"); my $expect = qr/\AMessage-ID: /i . qr/\Q<$long_hdr>\E/; ok(scalar(grep(/$expect/, @$hdr)), 'Message-ID not folded'); diff --git a/t/v2mda.t b/t/v2mda.t index 38aea0c1..3dfc569e 100644 --- a/t/v2mda.t +++ b/t/v2mda.t @@ -46,10 +46,6 @@ local $ENV{ORIGINAL_RECIPIENT} = 'test@example.com'; ok(run_script(['-mda'], undef, $rdr), 'mda delivered a message'); $ibx = PublicInbox::Inbox->new($ibx); - -if ($V == 1) { - ok(run_script([ '-index', "$tmpdir/inbox" ]), 'v1 indexed'); -} my $msgs = $ibx->over->recent; is(scalar(@$msgs), 1, 'only got one message'); my $eml = $ibx->smsg_eml($msgs->[0]); diff --git a/t/watch_filter_rubylang.t b/t/watch_filter_rubylang.t index 5deb2082..004e794e 100644 --- a/t/watch_filter_rubylang.t +++ b/t/watch_filter_rubylang.t @@ -30,12 +30,9 @@ for my $v (@v) { my $maildir = "$tmpdir/md-$v"; my $spamdir = "$tmpdir/spam-$v"; my $addr = "test-$v\@example.com"; - my @cmd = ('-init', "-$v", $v, $inboxdir, + my @cmd = ('-init', '-Lfull', "-$v", $v, $inboxdir, "http://example.com/$v", $addr); - ok(run_script(\@cmd), 'public-inbox init OK'); - if ($v eq 'V1') { - ok(run_script(['-index', $inboxdir]), 'v1 indexed'); - } + ok(run_script(\@cmd), 'public-inbox init'); PublicInbox::Emergency->new($spamdir); for my $i (1..15) {