From: Eric Wong <e@80x24.org>
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 [thread overview]
Message-ID: <20210325042026.11270-7-e@80x24.org> (raw)
In-Reply-To: <20210325042026.11270-1-e@80x24.org>
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) {
next prev parent reply other threads:[~2021-03-25 4:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-25 4:20 [PATCH 00/10] lei testing improvements Eric Wong
2021-03-25 4:20 ` [PATCH 01/10] test_common: cleanup inbox objects after use Eric Wong
2021-03-25 4:20 ` [PATCH 02/10] lei: janky $PATH2CFG garbage collection Eric Wong
2021-03-25 4:20 ` [PATCH 03/10] test_common: TEST_LEI_ERR_LOUD does not hide path names Eric Wong
2021-03-25 4:20 ` [PATCH 04/10] lei add-external: do not initialize writable store Eric Wong
2021-03-25 4:20 ` [PATCH 05/10] lei_mirror: don't show success on failure Eric Wong
2021-03-25 4:20 ` Eric Wong [this message]
2021-03-25 4:20 ` [PATCH 07/10] tests: "check-run" uses persistent lei daemon Eric Wong
2021-03-25 4:20 ` [PATCH 08/10] lei import: force store, improve test diagnostics Eric Wong
2021-03-25 4:20 ` [PATCH 09/10] t/cmd_ipc: workaround signal handling raciness Eric Wong
2021-03-25 4:20 ` [PATCH 10/10] t/lei: add more diagnostics for failures Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210325042026.11270-7-e@80x24.org \
--to=e@80x24.org \
--cc=meta@public-inbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).