mirror of
https://github.com/restic/restic.git
synced 2025-10-10 06:00:13 +00:00
replace some usages of restic.Repository with more specific interface
This should eventually make it easier to test the code.
This commit is contained in:
@@ -40,7 +40,7 @@ type Dir struct {
|
||||
ModTime time.Time
|
||||
}
|
||||
|
||||
func saveFile(t testing.TB, repo restic.Repository, node File) restic.ID {
|
||||
func saveFile(t testing.TB, repo restic.BlobSaver, node File) restic.ID {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
||||
@@ -52,7 +52,7 @@ func saveFile(t testing.TB, repo restic.Repository, node File) restic.ID {
|
||||
return id
|
||||
}
|
||||
|
||||
func saveDir(t testing.TB, repo restic.Repository, nodes map[string]Node, inode uint64) restic.ID {
|
||||
func saveDir(t testing.TB, repo restic.BlobSaver, nodes map[string]Node, inode uint64) restic.ID {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
||||
|
Reference in New Issue
Block a user