pass context to Find / FindSnapshot

This allows proper interruption of restic while it searches for
snapshots or key files.
This commit is contained in:
Michael Eischer
2020-04-10 11:31:32 +02:00
parent 5fd3dbccb7
commit c458e114d4
13 changed files with 24 additions and 24 deletions

View File

@@ -574,7 +574,7 @@ func benchmarkSnapshotScaling(t *testing.B, newSnapshots int) {
chkr, repo, cleanup := loadBenchRepository(t)
defer cleanup()
snID, err := restic.FindSnapshot(repo, "51d249d2")
snID, err := restic.FindSnapshot(context.TODO(), repo, "51d249d2")
if err != nil {
t.Fatal(err)
}