X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fwatch_maildir_v2.t;h=0a5a8017ebf067aa273283776c0ce005040b7a92;hb=1317fb7b4ace03f6d9dfb1a42ee5f9371a1bf913;hp=5f968919dfff669080aa4af0909f5750d97965d0;hpb=b0e5062d43a96372801713ef78a78d6a1bc852bc;p=public-inbox.git
diff --git a/t/watch_maildir_v2.t b/t/watch_maildir_v2.t
index 5f968919..0a5a8017 100644
--- a/t/watch_maildir_v2.t
+++ b/t/watch_maildir_v2.t
@@ -1,4 +1,4 @@
-# Copyright (C) 2018 all contributors
+# Copyright (C) 2018-2019 all contributors
# License: AGPL-3.0+
use Test::More;
use File::Temp qw/tempdir/;
@@ -7,12 +7,12 @@ use Cwd;
use PublicInbox::Config;
require './t/common.perl';
require_git(2.6);
-my @mods = qw(Filesys::Notify::Simple PublicInbox::V2Writable);
+my @mods = qw(Search::Xapian DBD::SQLite Filesys::Notify::Simple);
foreach my $mod (@mods) {
eval "require $mod";
plan skip_all => "$mod missing for watch_maildir_v2.t" if $@;
}
-
+require PublicInbox::V2Writable;
my $tmpdir = tempdir('watch_maildir-v2-XXXXXX', TMPDIR => 1, CLEANUP => 1);
my $mainrepo = "$tmpdir/v2";
my $maildir = "$tmpdir/md";
@@ -40,14 +40,14 @@ ok(POSIX::mkfifo("$maildir/cur/fifo", 0777),
'create FIFO to ensure we do not get stuck on it :P');
my $sem = PublicInbox::Emergency->new($spamdir); # create dirs
-my %orig = (
- "$cfgpfx.address" => $addr,
- "$cfgpfx.mainrepo" => $mainrepo,
- "$cfgpfx.watch" => "maildir:$maildir",
- "$cfgpfx.filter" => 'PublicInbox::Filter::Vger',
- "publicinboxlearn.watchspam" => "maildir:$spamdir"
-);
-my $config = PublicInbox::Config->new({%orig});
+my $orig = <new(\$orig);
my $ibx = $config->lookup_name('test');
ok($ibx, 'found inbox by name');
my $srch = $ibx->search;
@@ -146,12 +146,12 @@ More majordomo info at http://vger.kernel.org/majordomo-info.html\n);
my $v1pfx = "publicinbox.v1";
my $v1addr = 'v1-public@example.com';
is(system(qw(git init -q --bare), $v1repo), 0, 'v1 init OK');
- my $config = PublicInbox::Config->new({
- %orig,
- "$v1pfx.address" => $v1addr,
- "$v1pfx.mainrepo" => $v1repo,
- "$v1pfx.watch" => "maildir:$maildir",
- });
+ my $cfg2 = <new(\$cfg2);
my $both = <