2014-10-21 22:02:20 +00:00
|
|
|
package filesystem
|
|
|
|
|
|
|
|
import (
|
|
|
|
"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() {
|
|
|
|
rootDirectory := "/tmp/driver"
|
|
|
|
os.RemoveAll(rootDirectory)
|
|
|
|
|
|
|
|
filesystemDriverConstructor := func() (storagedriver.StorageDriver, error) {
|
2014-10-29 01:15:40 +00:00
|
|
|
return New(rootDirectory), nil
|
2014-10-21 22:02:20 +00:00
|
|
|
}
|
2014-10-27 20:24:07 +00:00
|
|
|
testsuites.RegisterInProcessSuite(filesystemDriverConstructor, testsuites.NeverSkip)
|
2014-11-17 23:44:07 +00:00
|
|
|
testsuites.RegisterIPCSuite(driverName, map[string]string{"rootdirectory": rootDirectory}, testsuites.NeverSkip)
|
2014-10-21 22:02:20 +00:00
|
|
|
}
|