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:
Stephen J Day 2014-12-05 14:05:37 -08:00
parent d703a86a64
commit 8cb0e3398c
9 changed files with 60 additions and 36 deletions

View file

@ -1,3 +1,5 @@
// +build ignore
// Package azure provides a storagedriver.StorageDriver implementation to // Package azure provides a storagedriver.StorageDriver implementation to
// store blobs in Microsoft Azure Blob Storage Service. // store blobs in Microsoft Azure Blob Storage Service.
package azure package azure

View file

@ -1,3 +1,5 @@
// +build ignore
package azure package azure
import ( import (

View file

@ -4,7 +4,6 @@ import (
"fmt" "fmt"
"github.com/docker/docker-registry/storagedriver" "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 // 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) { func Create(name string, parameters map[string]string) (storagedriver.StorageDriver, error) {
driverFactory, ok := driverFactories[name] driverFactory, ok := driverFactories[name]
if !ok { 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 // No registered StorageDriverFactory found, try ipc
driverClient, err := ipc.NewDriverClient(name, parameters) // driverClient, err := ipc.NewDriverClient(name, parameters)
if err != nil { // if err != nil {
return nil, InvalidStorageDriverError{name} // return nil, InvalidStorageDriverError{name}
} // }
err = driverClient.Start() // err = driverClient.Start()
if err != nil { // if err != nil {
return nil, err // return nil, err
} // }
return driverClient, nil // return driverClient, nil
} }
return driverFactory.Create(parameters) return driverFactory.Create(parameters)
} }

View file

@ -1,3 +1,5 @@
// +build ignore
package ipc package ipc
import ( import (

View file

@ -1,3 +1,5 @@
// +build ignore
package ipc package ipc
import ( import (

View file

@ -1,3 +1,5 @@
// +build ignore
package ipc package ipc
import ( import (

View file

@ -1,3 +1,5 @@
// +build ignore
package s3 package s3
import ( import (

View file

@ -1,3 +1,5 @@
// +build ignore
package s3 package s3
import ( import (

View file

@ -13,7 +13,6 @@ import (
"time" "time"
"github.com/docker/docker-registry/storagedriver" "github.com/docker/docker-registry/storagedriver"
"github.com/docker/docker-registry/storagedriver/ipc"
"gopkg.in/check.v1" "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 // RegisterIPCSuite registers a storage driver test suite which runs the named
// driver as a child process with the given parameters. // driver as a child process with the given parameters.
func RegisterIPCSuite(driverName string, ipcParams map[string]string, skipCheck SkipCheck) { func RegisterIPCSuite(driverName string, ipcParams map[string]string, skipCheck SkipCheck) {
suite := &DriverSuite{ panic("ipc testing is disabled for now")
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) // NOTE(stevvooe): IPC testing is disabled for now. Uncomment the code
return driverClient.Stop() // block before and remove the panic when we phase it back in.
}
check.Suite(suite) // 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. // 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. // in to WriteStream concurrently without hanging.
// TODO(bbland): fix this test... // TODO(bbland): fix this test...
func (suite *DriverSuite) TestConcurrentFileStreams(c *check.C) { func (suite *DriverSuite) TestConcurrentFileStreams(c *check.C) {
if _, isIPC := suite.StorageDriver.(*ipc.StorageDriverClient); isIPC { // if _, isIPC := suite.StorageDriver.(*ipc.StorageDriverClient); isIPC {
c.Skip("Need to fix out-of-process concurrency") // c.Skip("Need to fix out-of-process concurrency")
} // }
var wg sync.WaitGroup var wg sync.WaitGroup