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:
parent
8affca40bb
commit
b319ba7c5a
12 changed files with 373 additions and 404 deletions
21
snapshot/storage/bolt_test.go
Normal file
21
snapshot/storage/bolt_test.go
Normal 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"))
|
||||
})
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue