snapshot: add Close()
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
This commit is contained in:
@@ -401,3 +401,8 @@ func (o *snapshotter) upperPath(id string) string {
|
||||
func (o *snapshotter) workPath(id string) string {
|
||||
return filepath.Join(o.root, "snapshots", id, "work")
|
||||
}
|
||||
|
||||
// Close closes the snapshotter
|
||||
func (o *snapshotter) Close() error {
|
||||
return o.ms.Close()
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ func newSnapshotter(ctx context.Context, root string) (snapshot.Snapshotter, fun
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
return snapshotter, nil, nil
|
||||
return snapshotter, func() error { return snapshotter.Close() }, nil
|
||||
}
|
||||
|
||||
func TestOverlay(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user