|
@@ -13,7 +13,6 @@ import (
|
|
|
"github.com/docker/docker/daemon/graphdriver"
|
|
|
"github.com/docker/docker/daemon/graphdriver/vfs"
|
|
|
"github.com/docker/docker/pkg/archive"
|
|
|
- "github.com/docker/docker/pkg/containerfs"
|
|
|
"github.com/docker/docker/pkg/idtools"
|
|
|
"github.com/docker/docker/pkg/stringid"
|
|
|
"github.com/opencontainers/go-digest"
|
|
@@ -80,7 +79,7 @@ func newTestStore(t *testing.T) (Store, string, func()) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-type layerInit func(root containerfs.ContainerFS) error
|
|
|
+type layerInit func(root string) error
|
|
|
|
|
|
func createLayer(ls Store, parent ChainID, layerFunc layerInit) (Layer, error) {
|
|
|
containerID := stringid.GenerateRandomID()
|
|
@@ -121,7 +120,7 @@ func createLayer(ls Store, parent ChainID, layerFunc layerInit) (Layer, error) {
|
|
|
}
|
|
|
|
|
|
type FileApplier interface {
|
|
|
- ApplyFile(root containerfs.ContainerFS) error
|
|
|
+ ApplyFile(root string) error
|
|
|
}
|
|
|
|
|
|
type testFile struct {
|
|
@@ -138,7 +137,7 @@ func newTestFile(name string, content []byte, perm os.FileMode) FileApplier {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-func (tf *testFile) ApplyFile(root containerfs.ContainerFS) error {
|
|
|
+func (tf *testFile) ApplyFile(root string) error {
|
|
|
fullPath := filepath.Join(root, tf.name)
|
|
|
if err := os.MkdirAll(filepath.Dir(fullPath), 0755); err != nil {
|
|
|
return err
|
|
@@ -153,7 +152,7 @@ func (tf *testFile) ApplyFile(root containerfs.ContainerFS) error {
|
|
|
}
|
|
|
|
|
|
func initWithFiles(files ...FileApplier) layerInit {
|
|
|
- return func(root containerfs.ContainerFS) error {
|
|
|
+ return func(root string) error {
|
|
|
for _, f := range files {
|
|
|
if err := f.ApplyFile(root); err != nil {
|
|
|
return err
|