use PublicInbox::View;
require './t/common.perl';
+my $pi_dir = $ENV{GIANT_PI_DIR};
+plan skip_all => "GIANT_PI_DIR not defined for $0" unless $pi_dir;
+
my @cat = qw(cat-file --buffer --batch-check --batch-all-objects);
if (require_git(2.19, 1)) {
push @cat, '--unordered';
"git <2.19, cat-file lacks --unordered, locality suffers\n";
}
-my $pi_dir = $ENV{GIANT_PI_DIR};
-plan skip_all => "GIANT_PI_DIR not defined for $0" unless $pi_dir;
-
-my $ibx = PublicInbox::Inbox->new({ mainrepo => $pi_dir, name => 'name' });
+use_ok 'Plack::Util';
+my $ibx = PublicInbox::Inbox->new({ inboxdir => $pi_dir, name => 'name' });
my $git = $ibx->git;
my $fh = $git->popen(@cat);
my $vec = '';
my $ctx = {
env => { HTTP_HOST => 'example.com', 'psgi.url_scheme' => 'https' },
-inbox => $ibx,
+ www => Plack::Util::inline_object(style => sub {''}),
};
my ($str, $mime, $res, $cmt, $type);
my $n = 0;