backends: pass error logger to backends

This commit is contained in:
Michael Eischer
2025-09-14 16:13:21 +02:00
parent 13f743e26b
commit 4dc71f24c5
31 changed files with 96 additions and 96 deletions

View File

@@ -91,7 +91,7 @@ func TestRepositoryWithVersion(t testing.TB, version uint) (*Repository, restic.
if dir != "" {
_, err := os.Stat(dir)
if err != nil {
lbe, err := local.Create(context.TODO(), local.Config{Path: dir})
lbe, err := local.Create(context.TODO(), local.Config{Path: dir}, t.Logf)
if err != nil {
t.Fatalf("error creating local backend at %v: %v", dir, err)
}
@@ -115,7 +115,7 @@ func TestFromFixture(t testing.TB, repoFixture string) (*Repository, backend.Bac
// TestOpenLocal opens a local repository.
func TestOpenLocal(t testing.TB, dir string) (*Repository, backend.Backend) {
var be backend.Backend
be, err := local.Open(context.TODO(), local.Config{Path: dir, Connections: 2})
be, err := local.Open(context.TODO(), local.Config{Path: dir, Connections: 2}, t.Logf)
if err != nil {
t.Fatal(err)
}