- my $cfgpfx = "publicinbox.test-$i";
- my $addr = "test-$i\@example.com";
- my $mainrepo = "$tmp/$i";
- $cfg .= "$cfgpfx.address=$addr\n";
- $cfg .= "$cfgpfx.mainrepo=$mainrepo\n";
- $cfg .= "$cfgpfx.url=http://example.com/$i\n";
- my $opt = {
- mainrepo => $mainrepo,
- name => "test-$i",
- version => 2,
- indexlevel => 'basic',
- -primary_address => $addr,
- };
- my $ibx = PublicInbox::Inbox->new($opt);
- my $im = PublicInbox::V2Writable->new($ibx, 1);
- $im->{parallel} = 0;
- $im->init_inbox(0);
- my $mime = PublicInbox::MIME->new(<<EOF);
+ my $ibx = create_inbox "test-$i", version => 2, indexlevel => 'basic',
+ sub {
+ my ($im, $ibx) = @_;
+ $im->add(PublicInbox::Eml->new(<<EOF)) or BAIL_OUT;