]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/mda.t
import: init_bare: allow use as method, use in tests
[public-inbox.git] / t / mda.t
diff --git a/t/mda.t b/t/mda.t
index ec09cf69bb6a6e1a229b19aed2e15f3449d781d0..af5e19319ed82cbbc30b687a0a6b92036db261eb 100644 (file)
--- a/t/mda.t
+++ b/t/mda.t
@@ -9,6 +9,7 @@ use PublicInbox::MID qw(mid2path);
 use PublicInbox::Git;
 use PublicInbox::InboxWritable;
 use PublicInbox::TestCommon;
+use PublicInbox::Import;
 my ($tmpdir, $for_destroy) = tmpdir();
 my $home = "$tmpdir/pi-home";
 my $pi_home = "$home/.public-inbox";
@@ -48,7 +49,7 @@ my $fail_bad_header = sub ($$$) {
                "spamc mock found (run in top of source tree");
        is(1, mkdir($home, 0755), "setup ~/ for testing");
        is(1, mkdir($pi_home, 0755), "setup ~/.public-inbox");
-       is(0, system(qw(git init -q --bare), $maindir), "git init (main)");
+       PublicInbox::Import::init_bare($maindir);
 
        open my $fh, '>>', $pi_config or die;
        print $fh <<EOF or die;