-use PublicInbox::Import;
-use PublicInbox::Git;
-use PublicInbox::Config;
-use PublicInbox::WWW;
-use Plack::Builder;
-use Plack::App::URLMap;
-my $config = PublicInbox::Config->new({
- "$cfgpfx.address" => $addr,
- "$cfgpfx.mainrepo" => $maindir,
-});
-is(0, system(qw(git init -q --bare), $maindir), "git init (main)");
-my $git = PublicInbox::Git->new($maindir);
-my $im = PublicInbox::Import->new($git, 'test', $addr);
-{
- my $mime = Email::MIME->new(<<EOF);
+use_ok 'PublicInbox::WWW';
+my $ibx = create_inbox 'test', tmpdir => $v1dir, sub {
+ my ($im, $ibx) = @_;
+ $im->add(PublicInbox::Eml->new(<<EOF)) or BAIL_OUT;