2
2
mirror of https://github.com/octoleo/restic.git synced 2024-06-05 10:30:49 +00:00

Fix restic configuration for integration tests

This commit is contained in:
Alexander Neumann 2015-06-11 21:07:51 +02:00
parent 9c2478a291
commit d8d09b6d69

View File

@ -24,12 +24,11 @@ func setupTempdir(t testing.TB) (tempdir string) {
} }
func configureRestic(t testing.TB, tempdir string) { func configureRestic(t testing.TB, tempdir string) {
// use cache dir within tempdir opts.CacheDir = filepath.Join(tempdir, "cache")
OK(t, os.Setenv("RESTIC_CACHE", filepath.Join(tempdir, "cache")))
// configure environment
opts.Repo = filepath.Join(tempdir, "repo") opts.Repo = filepath.Join(tempdir, "repo")
OK(t, os.Setenv("RESTIC_PASSWORD", *TestPassword)) opts.Quiet = true
opts.password = *TestPassword
} }
func cleanupTempdir(t testing.TB, tempdir string) { func cleanupTempdir(t testing.TB, tempdir string) {