]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/v1reindex.t
import: init_bare: allow use as method, use in tests
[public-inbox.git] / t / v1reindex.t
index 240e28f92d6cd16c486bd731cf98c5cae10ac8be..378c8efb469baa852f34e7b58eef1be67424237e 100644 (file)
@@ -12,7 +12,6 @@ require_mods(qw(DBD::SQLite Search::Xapian));
 use_ok 'PublicInbox::SearchIdx';
 use_ok 'PublicInbox::Import';
 my ($inboxdir, $for_destroy) = tmpdir();
-is(system(qw(git init -q --bare), $inboxdir), 0);
 my $ibx_config = {
        inboxdir => $inboxdir,
        name => 'test-v1reindex',
@@ -35,6 +34,7 @@ my ($mark1, $mark2, $mark3, $mark4);
        my %config = %$ibx_config;
        my $ibx = PublicInbox::Inbox->new(\%config);
        my $im = PublicInbox::Import->new($ibx->git, undef, undef, $ibx);
+       $im->init_bare;
        foreach my $i (1..10) {
                $mime->header_set('Message-Id', "<$i\@example.com>");
                ok($im->add($mime), "message $i added");