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"
|
|
|
|
|
2015-02-11 03:14:23 +01:00
|
|
|
storagedriver "github.com/docker/distribution/registry/storage/driver"
|
|
|
|
"github.com/docker/distribution/registry/storage/driver/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)
|
|
|
|
|
2015-06-30 01:39:45 +02:00
|
|
|
testsuites.RegisterSuite(func() (storagedriver.StorageDriver, error) {
|
2014-12-04 01:44:20 +01:00
|
|
|
return New(root), nil
|
|
|
|
}, testsuites.NeverSkip)
|
2014-10-22 00:02:20 +02:00
|
|
|
}
|