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"
|
|
|
|
|
2014-12-24 00:01:38 +00:00
|
|
|
"github.com/docker/distribution/storagedriver"
|
|
|
|
"github.com/docker/distribution/storagedriver/testsuites"
|
2014-10-21 22:02:20 +00:00
|
|
|
. "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
|
|
|
}
|