use File::Path qw(mkpath);
use PublicInbox::TestCommon;
use PublicInbox::Spawn qw(which spawn);
+require_mods(qw(DBD::SQLite Email::Address::XS||Mail::Address));
my $inboxdir = $ENV{GIANT_INBOX_DIR};
(defined($inboxdir) && -d $inboxdir) or
plan skip_all => "GIANT_INBOX_DIR not defined for $0";
plan skip_all => "bad characters in $inboxdir" if $inboxdir =~ m![^\w\.\-/]!;
my ($tmpdir, $for_destroy) = tmpdir();
my $cfg = "$tmpdir/cfg";
-my $mailbox = 'inbox.test';
+my $newsgroup = 'inbox.test';
+my $mailbox = "$newsgroup.0";
{
open my $fh, '>', $cfg or BAIL_OUT "open: $!";
print $fh <<EOF or BAIL_OUT "print: $!";
[publicinbox "test"]
- newsgroup = $mailbox
+ newsgroup = $newsgroup
address = oimap\@example.com
inboxdir = $inboxdir
EOF
# DisableExtension COMPRESS=DEFLATE
Channel "test"
-Master ":remote:inbox"
+Master ":remote:INBOX"
Slave ":local:test"
Expunge None
Sync PullNew
is($?, 0, join(' ', @$cmd, 'done'));
}
-if (my $sec = $ENV{TEST_PERSIST}) {
+my $sec = $ENV{TEST_PERSIST} // 0;
+diag "TEST_PERSIST=$sec";
+if ($sec) {
diag "sleeping ${sec}s, imap://$host:$port/$mailbox available";
diag "tmpdir=$tmpdir (Maildirs available)";
diag "stdout=$out";