github.com/npaton/distribution@v2.3.1-rc.0+incompatible/registry/storage/driver/filesystem/driver_test.go (about)

     1  package filesystem
     2  
     3  import (
     4  	"io/ioutil"
     5  	"os"
     6  	"testing"
     7  
     8  	storagedriver "github.com/docker/distribution/registry/storage/driver"
     9  	"github.com/docker/distribution/registry/storage/driver/testsuites"
    10  	. "gopkg.in/check.v1"
    11  )
    12  
    13  // Hook up gocheck into the "go test" runner.
    14  func Test(t *testing.T) { TestingT(t) }
    15  
    16  func init() {
    17  	root, err := ioutil.TempDir("", "driver-")
    18  	if err != nil {
    19  		panic(err)
    20  	}
    21  	defer os.Remove(root)
    22  
    23  	testsuites.RegisterSuite(func() (storagedriver.StorageDriver, error) {
    24  		return New(root), nil
    25  	}, testsuites.NeverSkip)
    26  }