tests: Standardize use of SetupRepo/Teardown

This commit is contained in:
Alexander Neumann 2015-06-26 22:12:04 +02:00
parent d9a8dcfd67
commit 189a33730a
7 changed files with 65 additions and 51 deletions

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)