mirror of
https://github.com/restic/restic.git
synced 2026-09-18 18:27:58 +00:00
tests: Standardize use of SetupRepo/Teardown
This commit is contained in:
+3
-3
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user