From 60e1557b219ed1b2901f619c7d8812e4adb732bd Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Tue, 27 Jun 2017 09:01:59 +0000 Subject: [PATCH] checkSnapshotterBasic: fix umount The "nextnext" snapshot is being removed at the end of the function. So umount is needed before removing the snapshot. Signed-off-by: Akihiro Suda --- snapshot/testsuite/testsuite.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/snapshot/testsuite/testsuite.go b/snapshot/testsuite/testsuite.go index f447802d0..3eddf2dcc 100644 --- a/snapshot/testsuite/testsuite.go +++ b/snapshot/testsuite/testsuite.go @@ -181,13 +181,14 @@ func checkSnapshotterBasic(ctx context.Context, t *testing.T, snapshotter snapsh if err := mount.MountAll(mounts, nextnext); err != nil { t.Fatalf("failure reason: %+v", err) } - defer testutil.Unmount(t, nextnext) if err := fstest.CheckDirectoryEqualWithApplier(nextnext, fstest.Apply(initialApplier, diffApplier)); err != nil { + testutil.Unmount(t, nextnext) t.Fatalf("failure reason: %+v", err) } + testutil.Unmount(t, nextnext) assert.NoError(t, snapshotter.Remove(ctx, nextnext)) assert.Error(t, snapshotter.Remove(ctx, committed)) assert.NoError(t, snapshotter.Remove(ctx, nextCommitted))