forked from TrueCloudLab/restic
tests: Standardize use of SetupRepo/Teardown
This commit is contained in:
parent
d9a8dcfd67
commit
189a33730a
7 changed files with 65 additions and 51 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue