Check Docker init PID is valid before we use it.

This gives us an error if the PID is not returned as we expect.
This commit is contained in:
Victor Marmol
2015-02-20 13:10:40 -08:00
parent a5fdac2f3f
commit da2f4b6d61
2 changed files with 8 additions and 1 deletions

View File

@@ -121,7 +121,10 @@ func (f *FakeDockerClient) StartContainer(id string, hostConfig *docker.HostConf
Name: id, // For testing purpose, we set name to id
Config: &docker.Config{Image: "testimage"},
HostConfig: hostConfig,
State: docker.State{Running: true},
State: docker.State{
Running: true,
Pid: 42,
},
}
return f.Err
}