enable native (formerly naive) snapshotter by default
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
This commit is contained in:
@@ -25,17 +25,17 @@ import (
|
||||
|
||||
"github.com/boltdb/bolt"
|
||||
"github.com/containerd/containerd/snapshots"
|
||||
"github.com/containerd/containerd/snapshots/naive"
|
||||
"github.com/containerd/containerd/snapshots/native"
|
||||
"github.com/containerd/containerd/snapshots/testsuite"
|
||||
"github.com/containerd/containerd/testutil"
|
||||
)
|
||||
|
||||
func newTestSnapshotter(ctx context.Context, root string) (snapshots.Snapshotter, func() error, error) {
|
||||
naiveRoot := filepath.Join(root, "naive")
|
||||
if err := os.Mkdir(naiveRoot, 0770); err != nil {
|
||||
nativeRoot := filepath.Join(root, "native")
|
||||
if err := os.Mkdir(nativeRoot, 0770); err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
snapshotter, err := naive.NewSnapshotter(naiveRoot)
|
||||
snapshotter, err := native.NewSnapshotter(nativeRoot)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
@@ -45,7 +45,7 @@ func newTestSnapshotter(ctx context.Context, root string) (snapshots.Snapshotter
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
sn := NewDB(db, nil, map[string]snapshots.Snapshotter{"naive": snapshotter}).Snapshotter("naive")
|
||||
sn := NewDB(db, nil, map[string]snapshots.Snapshotter{"native": snapshotter}).Snapshotter("native")
|
||||
|
||||
return sn, func() error {
|
||||
if err := sn.Close(); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user