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

@ -0,0 +1,21 @@
package storage
import (
"path/filepath"
"testing"
// Does not require root but flag must be defined for snapshot tests
_ "github.com/containerd/containerd/testutil"
)
func TestMetastore(t *testing.T) {
MetaStoreSuite(t, "Metastore", func(root string) (*MetaStore, error) {
return NewMetaStore(filepath.Join(root, "metadata.db"))
})
}
func BenchmarkSuite(b *testing.B) {
Benchmarks(b, "BoltDBBench", func(root string) (*MetaStore, error) {
return NewMetaStore(filepath.Join(root, "metadata.db"))
})
}