X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fpurge.t;h=a33cd3290fc6ca7b000a1bac0e8e5ec9a4b08e58;hb=41c3eed65eb03256b0916cfdbf43723e070a633a;hp=12644d691f038b3034c97280fb45a3e557f2fc14;hpb=ad6f26f3b9f0e428020d05667987556f8fcbec2f;p=public-inbox.git
diff --git a/t/purge.t b/t/purge.t
index 12644d69..a33cd329 100644
--- a/t/purge.t
+++ b/t/purge.t
@@ -1,16 +1,13 @@
-# Copyright (C) 2019 all contributors
+# Copyright (C) 2019-2021 all contributors
# License: AGPL-3.0+
use strict;
use warnings;
use Test::More;
-require './t/common.perl';
+use PublicInbox::TestCommon;
require_git(2.6);
-my @mods = qw(DBI DBD::SQLite);
-foreach my $mod (@mods) {
- eval "require $mod";
- plan skip_all => "missing $mod for t/purge.t" if $@;
-};
+require_mods(qw(DBD::SQLite));
use Cwd qw(abs_path); # we need this since we chdir below
+local $ENV{HOME} = abs_path('t');
my $purge = abs_path('blib/script/public-inbox-purge');
my ($tmpdir, $for_destroy) = tmpdir();
use_ok 'PublicInbox::V2Writable';
@@ -19,6 +16,7 @@ my $ibx = PublicInbox::Inbox->new({
inboxdir => $inboxdir,
name => 'test-v2purge',
version => 2,
+ -no_fsync => 1,
-primary_address => 'test@example.com',
indexlevel => 'basic',
});
@@ -39,7 +37,7 @@ local $ENV{PI_CONFIG} = $cfgfile;
open my $cfg_fh, '>', $cfgfile or die "open: $!";
my $v2w = PublicInbox::V2Writable->new($ibx, {nproc => 1});
-my $mime = PublicInbox::MIME->new($raw);
+my $mime = PublicInbox::Eml->new($raw);
ok($v2w->add($mime), 'add message to be purged');
$v2w->done;