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 <suda.akihiro@lab.ntt.co.jp>
This commit is contained in:
parent
13f90e95a7
commit
60e1557b21
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user