1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Fix integration tests

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
Michael Crosby 2014-01-30 11:50:59 -08:00
parent 2d8709696c
commit 49b9813035
3 changed files with 11 additions and 3 deletions

View file

@ -1109,7 +1109,7 @@ func (container *Container) allocateNetwork() error {
var (
env *engine.Env
eng = container.runtime.srv.Eng
eng = container.runtime.eng
)
if container.State.IsGhost() {
if container.runtime.config.DisableNetwork {
@ -1220,7 +1220,7 @@ func (container *Container) releaseNetwork() {
if container.Config.NetworkDisabled {
return
}
eng := container.runtime.srv.Eng
eng := container.runtime.eng
eng.Job("release_interface", container.ID).Run()
container.NetworkSettings = &NetworkSettings{}

View file

@ -34,7 +34,13 @@ func mkRuntime(f utils.Fataler) *docker.Runtime {
AutoRestart: false,
Mtu: docker.DefaultNetworkMtu,
}
r, err := docker.NewRuntimeFromDirectory(config)
eng, err := engine.New(root)
if err != nil {
f.Fatal(err)
}
r, err := docker.NewRuntimeFromDirectory(config, eng)
if err != nil {
f.Fatal(err)
}

View file

@ -50,6 +50,7 @@ type Runtime struct {
sysInfo *sysinfo.SysInfo
volumes *Graph
srv *Server
eng *engine.Engine
config *DaemonConfig
containerGraph *graphdb.Database
driver graphdriver.Driver
@ -740,6 +741,7 @@ func NewRuntimeFromDirectory(config *DaemonConfig, eng *engine.Engine) (*Runtime
driver: driver,
sysInitPath: sysInitPath,
execDriver: ed,
eng: eng,
}
if err := runtime.restore(); err != nil {