Cleanup metadata tests

This commit replaces func returns with t.Cleanup,
which makes API and tests slightly easier to maintain.

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
Maksym Pavlenko
2022-06-27 11:54:45 -07:00
parent 813780e443
commit d97b754a5b
9 changed files with 73 additions and 123 deletions

View File

@@ -73,11 +73,9 @@ func TestMetadata(t *testing.T) {
}
func TestSnapshotterWithRef(t *testing.T) {
ctx, db, done := testDB(t, withSnapshotter("tmp", func(string) (snapshots.Snapshotter, error) {
ctx, db := testDB(t, withSnapshotter("tmp", func(string) (snapshots.Snapshotter, error) {
return NewTmpSnapshotter(), nil
}))
defer done()
sn := db.Snapshotter("tmp")
test1opt := snapshots.WithLabels(