2014-10-22 00:02:20 +02:00
|
|
|
package filesystem
|
|
|
|
|
|
|
|
import (
|
2014-12-04 01:44:20 +01:00
|
|
|
"io/ioutil"
|
2014-10-22 00:02:20 +02:00
|
|
|
"os"
|
|
|
|
"testing"
|
|
|
|
|
2014-12-24 01:01:38 +01:00
|
|
|
"github.com/docker/distribution/storagedriver"
|
|
|
|
"github.com/docker/distribution/storagedriver/testsuites"
|
2014-10-22 00:02:20 +02: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 01:44:20 +01:00
|
|
|
root, err := ioutil.TempDir("", "driver-")
|
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
2014-10-22 00:02:20 +02:00
|
|
|
}
|
2014-12-04 01:44:20 +01: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-22 00:02:20 +02:00
|
|
|
}
|