backend test: Always remove files for TestList
This commit is contained in:
parent
3eea555155
commit
b8af7f63a0
1 changed files with 11 additions and 14 deletions
|
@ -675,24 +675,21 @@ func (s *Suite) TestBackend(t *testing.T) {
|
||||||
t.Fatalf("lists aren't equal, want:\n %v\n got:\n%v\n", IDs, list)
|
t.Fatalf("lists aren't equal, want:\n %v\n got:\n%v\n", IDs, list)
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove content if requested
|
var handles []restic.Handle
|
||||||
if test.TestCleanupTempDirs {
|
for _, ts := range testStrings {
|
||||||
var handles []restic.Handle
|
id, err := restic.ParseID(ts.id)
|
||||||
for _, ts := range testStrings {
|
test.OK(t, err)
|
||||||
id, err := restic.ParseID(ts.id)
|
|
||||||
test.OK(t, err)
|
|
||||||
|
|
||||||
h := restic.Handle{Type: tpe, Name: id.String()}
|
h := restic.Handle{Type: tpe, Name: id.String()}
|
||||||
|
|
||||||
found, err := b.Test(context.TODO(), h)
|
found, err := b.Test(context.TODO(), h)
|
||||||
test.OK(t, err)
|
test.OK(t, err)
|
||||||
test.Assert(t, found, fmt.Sprintf("id %q not found", id))
|
test.Assert(t, found, fmt.Sprintf("id %q not found", id))
|
||||||
|
|
||||||
handles = append(handles, h)
|
handles = append(handles, h)
|
||||||
}
|
|
||||||
|
|
||||||
test.OK(t, s.delayedRemove(t, b, handles...))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test.OK(t, s.delayedRemove(t, b, handles...))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue