mirror of
https://github.com/restic/restic.git
synced 2025-12-03 22:01:46 +00:00
restic: Cleanup and simplify TestCreateSnapshot
This commit is contained in:
@@ -340,11 +340,11 @@ var (
|
||||
depth = 3
|
||||
)
|
||||
|
||||
func createFilledRepo(t testing.TB, snapshots int, dup float32, version uint) restic.Repository {
|
||||
func createFilledRepo(t testing.TB, snapshots int, version uint) restic.Repository {
|
||||
repo := repository.TestRepositoryWithVersion(t, version)
|
||||
|
||||
for i := 0; i < snapshots; i++ {
|
||||
restic.TestCreateSnapshot(t, repo, snapshotTime.Add(time.Duration(i)*time.Second), depth, dup)
|
||||
restic.TestCreateSnapshot(t, repo, snapshotTime.Add(time.Duration(i)*time.Second), depth)
|
||||
}
|
||||
return repo
|
||||
}
|
||||
@@ -354,7 +354,7 @@ func TestIndexSave(t *testing.T) {
|
||||
}
|
||||
|
||||
func testIndexSave(t *testing.T, version uint) {
|
||||
repo := createFilledRepo(t, 3, 0, version)
|
||||
repo := createFilledRepo(t, 3, version)
|
||||
|
||||
err := repo.LoadIndex(context.TODO())
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user