Merge pull request #14917 from srust/14915-empty-hostconfig-on-create

Check for nil before using HostConfig to adjustCpuShares
This commit is contained in:
Alexander Morozov
2015-07-27 09:38:32 -07:00
2 changed files with 11 additions and 1 deletions
@@ -1687,3 +1687,13 @@ func (s *DockerSuite) TestPostContainersStartWithLinksInHostConfigIdLinked(c *ch
c.Assert(res.StatusCode, check.Equals, http.StatusNoContent)
b.Close()
}
// #14915
func (s *DockerSuite) TestContainersApiCreateNoHostConfig118(c *check.C) {
config := struct {
Image string
}{"busybox"}
status, _, err := sockRequest("POST", "/v1.18/containers/create", config)
c.Assert(err, check.IsNil)
c.Assert(status, check.Equals, http.StatusCreated)
}