mirror of
https://github.com/restic/restic.git
synced 2026-09-22 03:58:31 +00:00
Refactor configuration of cache dir and repository
This commit is contained in:
@@ -3,7 +3,6 @@ package test_helper
|
||||
import (
|
||||
"flag"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
@@ -25,10 +24,6 @@ func SetupRepo(t testing.TB) *repository.Repository {
|
||||
b, err := local.Create(filepath.Join(tempdir, "repo"))
|
||||
OK(t, err)
|
||||
|
||||
// set cache dir below temp dir
|
||||
err = os.Setenv("RESTIC_CACHE", filepath.Join(tempdir, "cache"))
|
||||
OK(t, err)
|
||||
|
||||
repo := repository.New(b)
|
||||
OK(t, repo.Init(*TestPassword))
|
||||
return repo
|
||||
|
||||
Reference in New Issue
Block a user