tests: Standardize use of SetupRepo/Teardown

This commit is contained in:
Alexander Neumann committed 2015-06-28 13:52:22 +02:00
1 parent d9a8dcfd67
commit 189a33730a
7 files changed
+65 -51

No files matched your search

+3 -3
View File
@@ -13,12 +13,12 @@ import (
var testWalkDirectory = flag.String("test.walkdir", ".", "test walking a directory (globbing pattern, default: .)")
func TestWalkTree(t *testing.T) {
repo := SetupRepo()
defer TeardownRepo(repo)
dirs, err := filepath.Glob(*testWalkDirectory)
OK(t, err)
repo := SetupRepo(t)
defer TeardownRepo(t, repo)
// archive a few files
arch := restic.NewArchiver(repo)
sn, _, err := arch.Snapshot(nil, dirs, nil)