mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
Working in memory donut driver
This commit is contained in:
@@ -29,10 +29,11 @@ type StorageDriver struct {
|
||||
}
|
||||
|
||||
// Start a single disk subsystem
|
||||
func Start() (chan<- string, <-chan error, storage.Storage) {
|
||||
func Start(donutBox donutbox.DonutBox) (chan<- string, <-chan error, storage.Storage) {
|
||||
ctrlChannel := make(chan string)
|
||||
errorChannel := make(chan error)
|
||||
s := new(StorageDriver)
|
||||
s.donutBox = donutBox
|
||||
go start(ctrlChannel, errorChannel, s)
|
||||
return ctrlChannel, errorChannel, s
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ import (
|
||||
|
||||
mstorage "github.com/minio-io/minio/pkg/storage"
|
||||
|
||||
"github.com/minio-io/minio/pkg/donutbox/donutmem"
|
||||
. "gopkg.in/check.v1"
|
||||
)
|
||||
|
||||
@@ -33,13 +34,13 @@ type MySuite struct{}
|
||||
var _ = Suite(&MySuite{})
|
||||
|
||||
func (s *MySuite) TestAPISuite(c *C) {
|
||||
c.Skip("Not implemented yet.")
|
||||
//c.Skip("Not implemented yet.")
|
||||
var storageList []string
|
||||
create := func() mstorage.Storage {
|
||||
path, err := ioutil.TempDir(os.TempDir(), "minio-fs-")
|
||||
c.Check(err, IsNil)
|
||||
storageList = append(storageList, path)
|
||||
_, _, store := Start() // TODO Make InMemory driver
|
||||
_, _, store := Start(donutmem.NewDonutMem()) // TODO Make InMemory driver
|
||||
return store
|
||||
}
|
||||
mstorage.APITestSuite(c, create)
|
||||
|
||||
Reference in New Issue
Block a user