Add "Test" prefix to backend test functions

This commit is contained in:
Alexander Neumann
2016-01-23 19:12:02 +01:00
parent e4f2e4a203
commit f05a32509e
13 changed files with 94 additions and 94 deletions

View File

@@ -60,7 +60,7 @@ func cmdMount(t testing.TB, global GlobalOptions, dir string, ready, done chan s
cmd := &CmdMount{global: &global, ready: ready, done: done}
OK(t, cmd.Execute([]string{dir}))
if TestCleanup {
if TestCleanupTempDirs {
RemoveAll(t, dir)
}
}

View File

@@ -178,7 +178,7 @@ func configureRestic(t testing.TB, cache, repo string) GlobalOptions {
}
func cleanupTempdir(t testing.TB, tempdir string) {
if !TestCleanup {
if !TestCleanupTempDirs {
t.Logf("leaving temporary directory %v used for test", tempdir)
return
}
@@ -209,7 +209,7 @@ func withTestEnvironment(t testing.TB, f func(*testEnvironment, GlobalOptions))
f(&env, configureRestic(t, env.cache, env.repo))
if !TestCleanup {
if !TestCleanupTempDirs {
t.Logf("leaving temporary directory %v used for test", tempdir)
return
}