]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/watch_filter_rubylang.t
No ext_urls
[public-inbox.git] / t / watch_filter_rubylang.t
index 9c70b4eae710990f1eebddd5301434c3eb5213bb..004e794ec8c224cedc7ac4e5bd63cdcb23553a95 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2019-2020 all contributors <meta@public-inbox.org>
+# Copyright (C) 2019-2021 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 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) {
@@ -74,6 +71,7 @@ publicinboxwatch.watchspam=maildir:$spamdir
 EOF
        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($cfg);
@@ -103,6 +101,7 @@ EOF
 
        $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');