mirror of
https://github.com/restic/restic.git
synced 2025-12-04 00:41:47 +00:00
Add "Test" prefix to backend test functions
This commit is contained in:
@@ -15,7 +15,7 @@ import (
|
||||
|
||||
var (
|
||||
TestPassword = getStringVar("RESTIC_TEST_PASSWORD", "geheim")
|
||||
TestCleanup = getBoolVar("RESTIC_TEST_CLEANUP", true)
|
||||
TestCleanupTempDirs = getBoolVar("RESTIC_TEST_CLEANUP", true)
|
||||
TestTempDir = getStringVar("RESTIC_TEST_TMPDIR", "")
|
||||
RunIntegrationTest = getBoolVar("RESTIC_TEST_INTEGRATION", true)
|
||||
RunFuseTest = getBoolVar("RESTIC_TEST_FUSE", true)
|
||||
@@ -70,7 +70,7 @@ func SetupRepo() *repository.Repository {
|
||||
}
|
||||
|
||||
func TeardownRepo(repo *repository.Repository) {
|
||||
if !TestCleanup {
|
||||
if !TestCleanupTempDirs {
|
||||
l := repo.Backend().(*local.Local)
|
||||
fmt.Printf("leaving local backend at %s\n", l.Location())
|
||||
return
|
||||
|
||||
@@ -158,7 +158,7 @@ func WithTestEnvironment(t testing.TB, repoFixture string, f func(repodir string
|
||||
|
||||
f(filepath.Join(tempdir, "repo"))
|
||||
|
||||
if !TestCleanup {
|
||||
if !TestCleanupTempDirs {
|
||||
t.Logf("leaving temporary directory %v used for test", tempdir)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user