about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/init.t2
-rw-r--r--t/v2writable.t16
2 files changed, 18 insertions, 0 deletions
diff --git a/t/init.t b/t/init.t
index 54b90ec5..6ae608e5 100644
--- a/t/init.t
+++ b/t/init.t
@@ -38,6 +38,8 @@ SKIP: {
         ok(-d "$tmpdir/v2list", 'v2list directory exists');
         ok(-f "$tmpdir/v2list/msgmap.sqlite3", 'msgmap exists');
         ok(-d "$tmpdir/v2list/all.git", 'catch-all.git directory exists');
+        @cmd = (qw(git config), "--file=$tmpdir/v2list/all.git/config",
+                qw(core.sharedRepository 0644));
 }
 
 done_testing();
diff --git a/t/v2writable.t b/t/v2writable.t
index bf8ae5e6..2d35aca3 100644
--- a/t/v2writable.t
+++ b/t/v2writable.t
@@ -32,6 +32,22 @@ my $mime = PublicInbox::MIME->create(
 
 my $im = PublicInbox::V2Writable->new($ibx, 1);
 ok($im->add($mime), 'ordinary message added');
+
+if ('ensure git configs are correct') {
+        my @cmd = (qw(git config), "--file=$mainrepo/all.git/config",
+                qw(core.sharedRepository 0644));
+        is(system(@cmd), 0, "set sharedRepository in all.git");
+        my $git0 = PublicInbox::Git->new("$mainrepo/git/0.git");
+        my $fh = $git0->popen(qw(config core.sharedRepository));
+        my $v = eval { local $/; <$fh> };
+        chomp $v;
+        is($v, '0644', 'child repo inherited core.sharedRepository');
+        $fh = $git0->popen(qw(config --bool repack.writeBitmaps));
+        $v = eval { local $/; <$fh> };
+        chomp $v;
+        is($v, 'true', 'child repo inherited repack.writeBitmaps');
+}
+
 {
         my @warn;
         local $SIG{__WARN__} = sub { push @warn, @_ };