mirror of
https://github.com/restic/restic.git
synced 2026-11-23 22:02:40 +00:00
tests: Standardize use of SetupRepo/Teardown
This commit is contained in:
1 parent
d9a8dcfd67
commit
189a33730a
7 files changed
+65
-51
No files matched your search
+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