containerd/snapshot/storage/boltdb/bolt_test.go
Derek McGowan 55ef482c5a Add storage testsuite
Added error variables and error check methods to snapshots

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-03-21 23:16:39 -07:00

25 lines
712 B
Go

package boltdb
import (
"context"
"path/filepath"
"testing"
"github.com/docker/containerd/snapshot/storage"
"github.com/docker/containerd/snapshot/storage/testsuite"
// Does not require root but flag must be defined for snapshot tests
_ "github.com/docker/containerd/testutil"
)
func TestBoltDB(t *testing.T) {
testsuite.MetaStoreSuite(t, "BoltDB", func(ctx context.Context, root string) (storage.MetaStore, error) {
return NewMetaStore(ctx, filepath.Join(root, "metadata.db"))
})
}
func BenchmarkSuite(b *testing.B) {
testsuite.Benchmarks(b, "BoltDBBench", func(ctx context.Context, root string) (storage.MetaStore, error) {
return NewMetaStore(ctx, filepath.Join(root, "metadata.db"))
})
}