2017-01-13 23:31:21 +00:00
|
|
|
package naive
|
2016-12-08 03:59:34 +00:00
|
|
|
|
|
|
|
import (
|
2017-04-05 20:56:27 +00:00
|
|
|
"context"
|
2016-12-08 03:59:34 +00:00
|
|
|
"testing"
|
|
|
|
|
2017-04-05 20:56:27 +00:00
|
|
|
"github.com/containerd/containerd/snapshot"
|
|
|
|
"github.com/containerd/containerd/snapshot/testsuite"
|
2017-04-03 20:14:15 +00:00
|
|
|
"github.com/containerd/containerd/testutil"
|
2016-12-08 03:59:34 +00:00
|
|
|
)
|
|
|
|
|
2017-04-05 20:56:27 +00:00
|
|
|
func newSnapshotter(ctx context.Context, root string) (snapshot.Snapshotter, func(), error) {
|
|
|
|
snapshotter, err := NewSnapshotter(root)
|
2016-12-08 03:59:34 +00:00
|
|
|
if err != nil {
|
2017-04-05 20:56:27 +00:00
|
|
|
return nil, nil, err
|
2016-12-08 03:59:34 +00:00
|
|
|
}
|
|
|
|
|
2017-04-05 20:56:27 +00:00
|
|
|
return snapshotter, func() {}, nil
|
|
|
|
}
|
2016-12-08 03:59:34 +00:00
|
|
|
|
2017-04-05 20:56:27 +00:00
|
|
|
func TestNaive(t *testing.T) {
|
|
|
|
testutil.RequiresRoot(t)
|
|
|
|
testsuite.SnapshotterSuite(t, "Naive", newSnapshotter)
|
2016-12-08 03:59:34 +00:00
|
|
|
}
|