X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fwatch_filter_rubylang.t;h=004e794ec8c224cedc7ac4e5bd63cdcb23553a95;hb=refs%2Fheads%2Fmaster;hp=6513f30b0441c42d0fa63366d79b4973e98e9260;hpb=80b887f29b2ec71d025b4c266a1c26314758994c;p=public-inbox.git diff --git a/t/watch_filter_rubylang.t b/t/watch_filter_rubylang.t index 6513f30b..004e794e 100644 --- a/t/watch_filter_rubylang.t +++ b/t/watch_filter_rubylang.t @@ -1,4 +1,4 @@ -# Copyright (C) 2019-2020 all contributors +# Copyright (C) 2019-2021 all contributors # License: AGPL-3.0+ use strict; use warnings; @@ -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) { @@ -72,11 +69,12 @@ $cfgpfx.filter=PublicInbox::Filter::RubyLang $cfgpfx.altid=serial:alerts:file=msgmap.sqlite3 publicinboxwatch.watchspam=maildir:$spamdir EOF - my $config = PublicInbox::Config->new(\$orig); - my $ibx = $config->lookup_name($v); + my $cfg = PublicInbox::Config->new(\$orig); + my $ibx = $cfg->lookup_name($v); + $ibx->{-no_fsync} = 1; ok($ibx, 'found inbox by name'); - my $w = PublicInbox::Watch->new($config); + my $w = PublicInbox::Watch->new($cfg); for my $i (1..2) { $w->scan('full'); } @@ -101,8 +99,9 @@ EOF } $w->scan('full'); - $config = PublicInbox::Config->new(\$orig); - $ibx = $config->lookup_name($v); + $cfg = PublicInbox::Config->new(\$orig); + $ibx = $cfg->lookup_name($v); + $ibx->{-no_fsync} = 1; is($ibx->search->reopen->mset('b:spam')->size, 0, 'spam removed'); is_deeply([], \@warn, 'no warnings');