Refactor configuration of cache dir and repository
This commit is contained in:
parent
848793df84
commit
f5537e7a0e
6 changed files with 57 additions and 43 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue