]> Sergey Matveev's repositories - public-inbox.git/commitdiff
t/*: drop unnecessary v1-specific index calls
authorEric Wong <e@80x24.org>
Thu, 25 Mar 2021 04:20:22 +0000 (06:20 +0200)
committerEric Wong <e@80x24.org>
Thu, 25 Mar 2021 17:59:00 +0000 (17:59 +0000)
Outside of mirrors, we can -init with indexlevel to avoid
calling -index explicitly.

t/inbox_idle.t
t/nntpd.t
t/v2mda.t
t/watch_filter_rubylang.t

index c9df73a11b6d08466808c76e2ea8eb7d7d9346cf..51379764f2703882232e0676c09a39208c7c71eb 100644 (file)
@@ -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;
index ce4d7cf9bf00a93415326ae07f7000001574b14b..67205fe5e27006d1d6460ea18b13a8d9590a81bf 100644 (file)
--- 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');
index 38aea0c164aebf75f5c151884c02ef4d50cfe9dc..3dfc569e1dc9b9e7c20a2eeddb6136d045f5c646 100644 (file)
--- 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]);
index 5deb20820b239dce05ff1f62790cfe59f9160a93..004e794ec8c224cedc7ac4e5bd63cdcb23553a95 100644 (file)
@@ -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) {