diff options
author | Eric Wong <e@yhbt.net> | 2020-04-21 03:22:51 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-04-21 20:13:52 +0000 |
commit | 47f8836273133fb4a13e895feff7f7ee34ae7109 (patch) | |
tree | 49b4f02126e746c9373c063872b7730705f595bd /t | |
parent | f1e0136491b6cb1ab7ca432eb051a880d788f5ad (diff) | |
download | public-inbox-47f8836273133fb4a13e895feff7f7ee34ae7109.tar.gz |
Since the advent of run_script(), we can rely on it to simplify our test code. Changes like this will let us evolve the internal API more easily while preserving stable CLI interfaces, especially since we test the v2 path by default, now.
Diffstat (limited to 't')
-rw-r--r-- | t/nntpd.t | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -6,8 +6,6 @@ use Test::More; use PublicInbox::TestCommon; use PublicInbox::Spawn qw(which); require_mods(qw(DBD::SQLite)); -require PublicInbox::SearchIdx; -require PublicInbox::Msgmap; require PublicInbox::InboxWritable; use Email::Simple; use IO::Socket; @@ -79,8 +77,8 @@ EOF $im->add($mime); $im->done; if ($version == 1) { - my $s = PublicInbox::SearchIdx->new($ibx, 1); - $s->index_sync; + ok(run_script(['-index', $ibx->{inboxdir}]), + 'indexed v1'); } } @@ -254,8 +252,8 @@ Date: Fri, 02 Oct 1993 00:00:00 +0000 $im->add($for_leafnode); $im->done; if ($version == 1) { - my $s = PublicInbox::SearchIdx->new($ibx, 1); - $s->index_sync; + 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/; |