Disable s3, azure and ipc packages and testing
The packages causing build errors are being disabled for now to let us split up the work in the different driver implementations without blocking integration into the main branch. The s3 and azure implementations need some effort to add Stat support. The ipc package needs that work plus some care around hanging send calls.
This commit is contained in:
parent
d703a86a64
commit
8cb0e3398c
9 changed files with 60 additions and 36 deletions
|
@ -1,3 +1,5 @@
|
|||
// +build ignore
|
||||
|
||||
// Package azure provides a storagedriver.StorageDriver implementation to
|
||||
// store blobs in Microsoft Azure Blob Storage Service.
|
||||
package azure
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// +build ignore
|
||||
|
||||
package azure
|
||||
|
||||
import (
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// +build ignore
|
||||
|
||||
package ipc
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// +build ignore
|
||||
|
||||
package ipc
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// +build ignore
|
||||
|
||||
package ipc
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// +build ignore
|
||||
|
||||
package s3
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
// +build ignore
|
||||
|
||||
package s3
|
||||
|
||||
import (
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue