Move boltdb implementation to storage package

Removes storage interface and replaces with storage functions.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
Derek McGowan 2017-03-24 17:16:41 -07:00
parent 8affca40bb
commit b319ba7c5a
No known key found for this signature in database
GPG key ID: F58C5D0A4405ACDB
12 changed files with 373 additions and 404 deletions

View file

@ -11,7 +11,6 @@ import (
"github.com/containerd/containerd"
"github.com/containerd/containerd/snapshot"
"github.com/containerd/containerd/snapshot/storage/boltdb"
"github.com/containerd/containerd/snapshot/testsuite"
"github.com/containerd/containerd/testutil"
)
@ -23,11 +22,7 @@ const (
func boltSnapshotter(t *testing.T) func(context.Context, string) (snapshot.Snapshotter, func(), error) {
return func(ctx context.Context, root string) (snapshot.Snapshotter, func(), error) {
device := setupBtrfsLoopbackDevice(t, root)
store, err := boltdb.NewMetaStore(ctx, filepath.Join(root, "metadata.db"))
if err != nil {
return nil, nil, err
}
snapshotter, err := NewSnapshotter(device.deviceName, root, store)
snapshotter, err := NewSnapshotter(device.deviceName, root)
if err != nil {
t.Fatal(err)
}