diff --git a/storagedriver/azure/azure.go b/storagedriver/azure/azure.go index 489a6348..64402f3b 100644 --- a/storagedriver/azure/azure.go +++ b/storagedriver/azure/azure.go @@ -1,3 +1,5 @@ +// +build ignore + // Package azure provides a storagedriver.StorageDriver implementation to // store blobs in Microsoft Azure Blob Storage Service. package azure diff --git a/storagedriver/azure/azure_test.go b/storagedriver/azure/azure_test.go index 888d1165..1edcc1ea 100644 --- a/storagedriver/azure/azure_test.go +++ b/storagedriver/azure/azure_test.go @@ -1,3 +1,5 @@ +// +build ignore + package azure import ( diff --git a/storagedriver/factory/factory.go b/storagedriver/factory/factory.go index 0b85f372..0f8ca001 100644 --- a/storagedriver/factory/factory.go +++ b/storagedriver/factory/factory.go @@ -4,7 +4,6 @@ import ( "fmt" "github.com/docker/docker-registry/storagedriver" - "github.com/docker/docker-registry/storagedriver/ipc" ) // driverFactories stores an internal mapping between storage driver names and their respective @@ -41,16 +40,23 @@ func Register(name string, factory StorageDriverFactory) { func Create(name string, parameters map[string]string) (storagedriver.StorageDriver, error) { driverFactory, ok := driverFactories[name] if !ok { + return nil, InvalidStorageDriverError{name} + + // NOTE(stevvooe): We are disabling storagedriver ipc for now, as the + // server and client need to be updated for the changed API calls and + // there were some problems libchan hanging. We'll phase this + // functionality back in over the next few weeks. + // No registered StorageDriverFactory found, try ipc - driverClient, err := ipc.NewDriverClient(name, parameters) - if err != nil { - return nil, InvalidStorageDriverError{name} - } - err = driverClient.Start() - if err != nil { - return nil, err - } - return driverClient, nil + // driverClient, err := ipc.NewDriverClient(name, parameters) + // if err != nil { + // return nil, InvalidStorageDriverError{name} + // } + // err = driverClient.Start() + // if err != nil { + // return nil, err + // } + // return driverClient, nil } return driverFactory.Create(parameters) } diff --git a/storagedriver/ipc/client.go b/storagedriver/ipc/client.go index 7e52a084..2dc5c44e 100644 --- a/storagedriver/ipc/client.go +++ b/storagedriver/ipc/client.go @@ -1,3 +1,5 @@ +// +build ignore + package ipc import ( diff --git a/storagedriver/ipc/ipc.go b/storagedriver/ipc/ipc.go index 82bdcbd7..45c54659 100644 --- a/storagedriver/ipc/ipc.go +++ b/storagedriver/ipc/ipc.go @@ -1,3 +1,5 @@ +// +build ignore + package ipc import ( diff --git a/storagedriver/ipc/server.go b/storagedriver/ipc/server.go index 1c0084f9..fa0077a8 100644 --- a/storagedriver/ipc/server.go +++ b/storagedriver/ipc/server.go @@ -1,3 +1,5 @@ +// +build ignore + package ipc import ( diff --git a/storagedriver/s3/s3.go b/storagedriver/s3/s3.go index 3d5cd511..e26d3be2 100644 --- a/storagedriver/s3/s3.go +++ b/storagedriver/s3/s3.go @@ -1,3 +1,5 @@ +// +build ignore + package s3 import ( diff --git a/storagedriver/s3/s3_test.go b/storagedriver/s3/s3_test.go index 6d7b3ff7..f7b4f80e 100644 --- a/storagedriver/s3/s3_test.go +++ b/storagedriver/s3/s3_test.go @@ -1,3 +1,5 @@ +// +build ignore + package s3 import ( diff --git a/storagedriver/testsuites/testsuites.go b/storagedriver/testsuites/testsuites.go index 0967e2db..0e4f5be1 100644 --- a/storagedriver/testsuites/testsuites.go +++ b/storagedriver/testsuites/testsuites.go @@ -13,7 +13,6 @@ import ( "time" "github.com/docker/docker-registry/storagedriver" - "github.com/docker/docker-registry/storagedriver/ipc" "gopkg.in/check.v1" ) @@ -33,29 +32,34 @@ func RegisterInProcessSuite(driverConstructor DriverConstructor, skipCheck SkipC // RegisterIPCSuite registers a storage driver test suite which runs the named // driver as a child process with the given parameters. func RegisterIPCSuite(driverName string, ipcParams map[string]string, skipCheck SkipCheck) { - suite := &DriverSuite{ - Constructor: func() (storagedriver.StorageDriver, error) { - d, err := ipc.NewDriverClient(driverName, ipcParams) - if err != nil { - return nil, err - } - err = d.Start() - if err != nil { - return nil, err - } - return d, nil - }, - SkipCheck: skipCheck, - } - suite.Teardown = func() error { - if suite.StorageDriver == nil { - return nil - } + panic("ipc testing is disabled for now") - driverClient := suite.StorageDriver.(*ipc.StorageDriverClient) - return driverClient.Stop() - } - check.Suite(suite) + // NOTE(stevvooe): IPC testing is disabled for now. Uncomment the code + // block before and remove the panic when we phase it back in. + + // suite := &DriverSuite{ + // Constructor: func() (storagedriver.StorageDriver, error) { + // d, err := ipc.NewDriverClient(driverName, ipcParams) + // if err != nil { + // return nil, err + // } + // err = d.Start() + // if err != nil { + // return nil, err + // } + // return d, nil + // }, + // SkipCheck: skipCheck, + // } + // suite.Teardown = func() error { + // if suite.StorageDriver == nil { + // return nil + // } + + // driverClient := suite.StorageDriver.(*ipc.StorageDriverClient) + // return driverClient.Stop() + // } + // check.Suite(suite) } // SkipCheck is a function used to determine if a test suite should be skipped. @@ -520,9 +524,9 @@ func (suite *DriverSuite) TestStatCall(c *check.C) { // in to WriteStream concurrently without hanging. // TODO(bbland): fix this test... func (suite *DriverSuite) TestConcurrentFileStreams(c *check.C) { - if _, isIPC := suite.StorageDriver.(*ipc.StorageDriverClient); isIPC { - c.Skip("Need to fix out-of-process concurrency") - } + // if _, isIPC := suite.StorageDriver.(*ipc.StorageDriverClient); isIPC { + // c.Skip("Need to fix out-of-process concurrency") + // } var wg sync.WaitGroup