From 072305c5b3cd02f14145bb30862458a8bd49f235 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Mon, 15 Jun 2026 22:31:11 +0200 Subject: [PATCH] repository: run version sub-tests of TestAllVersions in parallel TestRepositoryIncrementalIndex no longer modified index.Full as this modified global state and also had no effect on the test result. --- internal/repository/repository_test.go | 3 --- internal/repository/testing.go | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/internal/repository/repository_test.go b/internal/repository/repository_test.go index f84d4214a..7df317752 100644 --- a/internal/repository/repository_test.go +++ b/internal/repository/repository_test.go @@ -412,8 +412,6 @@ func TestRepositoryIncrementalIndex(t *testing.T) { func testRepositoryIncrementalIndex(t *testing.T, version uint) { repo, _, _ := repository.TestRepositoryWithVersion(t, version) - index.Full = func(*index.Index) bool { return true } - // add a few rounds of packs for j := 0; j < 5; j++ { // add some packs and write index @@ -445,7 +443,6 @@ func testRepositoryIncrementalIndex(t *testing.T, version uint) { t.Errorf("pack %v listed in %d indexes\n", packID, len(ids)) } } - } func TestInvalidCompression(t *testing.T) { diff --git a/internal/repository/testing.go b/internal/repository/testing.go index 976ae3b8a..d44586e44 100644 --- a/internal/repository/testing.go +++ b/internal/repository/testing.go @@ -148,6 +148,7 @@ type VersionedTest func(t *testing.T, version uint) func TestAllVersions(t *testing.T, test VersionedTest) { for version := restic.MinRepoVersion; version <= restic.MaxRepoVersion; version++ { t.Run(fmt.Sprintf("v%d", version), func(t *testing.T) { + t.Parallel() test(t, uint(version)) }) }