Skip to content

Commit 0c84097

Browse files
pks-tgitster
authored andcommitted
t: disable maintenance where we verify object database structure
We have a couple of tests that explicitly verify the structure of the object database. Naturally, this structure is dependent on whether or not we run repository maintenance: if it decides to optimize the object database the expected structure is likely to not materialize. Explicitly disable auto-maintenance in such tests so that we are not dependent on decisions made by our maintenance. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 226f66a commit 0c84097

11 files changed

Lines changed: 17 additions & 3 deletions

t/t0081-find-pack.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ test_expect_success 'add more packfiles' '
6868
'
6969

7070
test_expect_success 'add more commits (as loose objects)' '
71+
test_config maintenance.auto false &&
7172
test_commit six &&
7273
test_commit seven &&
7374

t/t5316-pack-delta-depth.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ test_description='pack-objects breaks long cross-pack delta chains'
4848
# repeatedly-modified file to generate the delta chain).
4949

5050
test_expect_success 'create series of packs' '
51+
test_config maintenance.auto false &&
5152
test-tool genrandom foo 4096 >content &&
5253
prev= &&
5354
for i in $(test_seq 1 10)

t/t5319-multi-pack-index.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,6 +1315,7 @@ test_expect_success 'bitmapped packs are stored via the BTMP chunk' '
13151315
git init repo &&
13161316
(
13171317
cd repo &&
1318+
git config set maintenance.auto false &&
13181319
13191320
for i in 1 2 3 4 5
13201321
do

t/t5326-multi-pack-bitmaps.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ test_midx_bitmap_cases () {
9393
test_expect_success 'setup test_repository' '
9494
rm -rf * .git &&
9595
git init &&
96-
git config pack.writeBitmapLookupTable '"$writeLookupTable"'
96+
git config pack.writeBitmapLookupTable '"$writeLookupTable"' &&
97+
git config maintenance.auto false
9798
'
9899

99100
midx_bitmap_core

t/t5327-multi-pack-bitmaps-rev.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ test_midx_bitmap_rev () {
3030
test_expect_success 'setup bitmap config' '
3131
rm -rf * .git &&
3232
git init &&
33-
git config pack.writeBitmapLookupTable '"$writeLookupTable"'
33+
git config pack.writeBitmapLookupTable '"$writeLookupTable"' &&
34+
git config maintenance.auto false
3435
'
3536

3637
midx_bitmap_core rev

t/t5331-pack-objects-stdin.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ packed_objects () {
1414

1515
test_expect_success 'setup for --stdin-packs tests' '
1616
git init stdin-packs &&
17+
git -C stdin-packs config set maintenance.auto false &&
1718
(
1819
cd stdin-packs &&
1920
@@ -255,6 +256,7 @@ test_expect_success '--stdin-packs=follow walks into unknown packs' '
255256
git init repo &&
256257
(
257258
cd repo &&
259+
git config set maintenance.auto false &&
258260
259261
for c in A B C D
260262
do

t/t5332-multi-pack-reuse.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ test_pack_objects_reused () {
5959

6060
test_expect_success 'preferred pack is reused for single-pack reuse' '
6161
test_config pack.allowPackReuse single &&
62+
git config set maintenance.auto false &&
6263
6364
for i in A B
6465
do

t/t5334-incremental-multi-pack-index.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ midx_chain=$midxdir/multi-pack-index-chain
1515

1616
test_expect_success 'convert non-incremental MIDX to incremental' '
1717
test_commit base &&
18+
git config set maintenance.auto false &&
1819
git repack -ad &&
1920
git multi-pack-index write &&
2021

t/t5500-fetch-pack.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@ test_expect_success 'clone shallow depth 1 with fsck' '
154154
'
155155

156156
test_expect_success 'clone shallow' '
157-
git clone --no-single-branch --depth 2 "file://$(pwd)/." shallow
157+
git clone --no-single-branch --depth 2 "file://$(pwd)/." shallow &&
158+
git -C shallow config set maintenance.auto false
158159
'
159160

160161
test_expect_success 'clone shallow depth count' '

t/t5616-partial-clone.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,7 @@ test_expect_success 'verify fetch downloads only one pack when updating refs' '
585585
git clone --filter=blob:none "file://$(pwd)/srv.bare" pack-test &&
586586
ls pack-test/.git/objects/pack/*pack >pack-list &&
587587
test_line_count = 2 pack-list &&
588+
test_config -C pack-test maintenance.auto false &&
588589
for i in A B C
589590
do
590591
test_commit -C src $i &&

0 commit comments

Comments
 (0)