mirror of
				https://github.com/restic/restic.git
				synced 2025-10-31 12:41:36 +00:00 
			
		
		
		
	repository: remove redundant flushes from tests
This commit is contained in:
		| @@ -170,12 +170,6 @@ func repack(t *testing.T, repo restic.Repository, packs restic.IDSet, blobs rest | ||||
| 	} | ||||
| } | ||||
|  | ||||
| func flush(t *testing.T, repo restic.Repository) { | ||||
| 	if err := repo.Flush(context.TODO()); err != nil { | ||||
| 		t.Fatalf("repo.SaveIndex() %v", err) | ||||
| 	} | ||||
| } | ||||
|  | ||||
| func rebuildIndex(t *testing.T, repo restic.Repository) { | ||||
| 	err := repo.SetIndex(index.NewMasterIndex()) | ||||
| 	rtest.OK(t, err) | ||||
| @@ -239,8 +233,6 @@ func testRepack(t *testing.T, version uint) { | ||||
| 			packsBefore, packsAfter) | ||||
| 	} | ||||
|  | ||||
| 	flush(t, repo) | ||||
|  | ||||
| 	removeBlobs, keepBlobs := selectBlobs(t, repo, 0.2) | ||||
|  | ||||
| 	removePacks := findPacksForBlobs(t, repo, removeBlobs) | ||||
| @@ -311,7 +303,6 @@ func testRepackCopy(t *testing.T, version uint) { | ||||
| 	// add a small amount of blobs twice to create multiple pack files | ||||
| 	createRandomBlobs(t, repo, 10, 0.7, false) | ||||
| 	createRandomBlobs(t, repo, 10, 0.7, false) | ||||
| 	flush(t, repo) | ||||
|  | ||||
| 	_, keepBlobs := selectBlobs(t, repo, 0.2) | ||||
| 	copyPacks := findPacksForBlobs(t, repo, keepBlobs) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Michael Eischer
					Michael Eischer