repository: make flushPacks private

This commit is contained in:
Michael Eischer 2022-05-26 13:30:52 +02:00
parent ed8aa15376
commit 628ae799ca
2 changed files with 6 additions and 15 deletions

View file

@ -414,22 +414,13 @@ func testRepositoryIncrementalIndex(t *testing.T, version uint) {
repository.IndexFull = func(*repository.Index, bool) bool { return true }
// add 15 packs
// add a few rounds of packs
for j := 0; j < 5; j++ {
// add 3 packs, write intermediate index
for i := 0; i < 3; i++ {
saveRandomDataBlobs(t, repo, 5, 1<<15)
rtest.OK(t, repo.FlushPacks(context.Background()))
}
// add some packs, write intermediate index
saveRandomDataBlobs(t, repo, 20, 1<<15)
rtest.OK(t, repo.Flush(context.TODO()))
}
// add another 5 packs
for i := 0; i < 5; i++ {
saveRandomDataBlobs(t, repo, 5, 1<<15)
rtest.OK(t, repo.FlushPacks(context.Background()))
}
// save final index
rtest.OK(t, repo.Flush(context.TODO()))