2014-10-21 22:02:20 +00:00
|
|
|
package filesystem
|
|
|
|
|
|
|
|
import (
|
2014-12-04 00:44:20 +00:00
|
|
|
"io/ioutil"
|
2014-10-21 22:02:20 +00:00
|
|
|
"os"
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/docker/docker-registry/storagedriver"
|
|
|
|
"github.com/docker/docker-registry/storagedriver/testsuites"
|
|
|
|
. "gopkg.in/check.v1"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Hook up gocheck into the "go test" runner.
|
|
|
|
func Test(t *testing.T) { TestingT(t) }
|
|
|
|
|
|
|
|
func init() {
|
2014-12-04 00:44:20 +00:00
|
|
|
root, err := ioutil.TempDir("", "driver-")
|
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
2014-10-21 22:02:20 +00:00
|
|
|
}
|
2014-12-04 00:44:20 +00:00
|
|
|
defer os.Remove(root)
|
|
|
|
|
|
|
|
testsuites.RegisterInProcessSuite(func() (storagedriver.StorageDriver, error) {
|
|
|
|
return New(root), nil
|
|
|
|
}, testsuites.NeverSkip)
|
|
|
|
|
|
|
|
// BUG(stevvooe): IPC is broken so we're disabling for now. Will revisit later.
|
|
|
|
// testsuites.RegisterIPCSuite(driverName, map[string]string{"rootdirectory": root}, testsuites.NeverSkip)
|
2014-10-21 22:02:20 +00:00
|
|
|
}
|