enable native (formerly naive) snapshotter by default

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
This commit is contained in:
Akihiro Suda
2018-04-02 13:29:19 +09:00
parent bf5112e8ec
commit 83e35b3d3a
7 changed files with 19 additions and 18 deletions

View File

@@ -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 {