1
0
mirror of https://github.com/moby/moby.git synced 2025-07-29 07:21:35 +03:00

Extract daemon to its own package

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester
2016-12-09 10:17:53 +01:00
parent 0a072e93df
commit 48de91a33f
39 changed files with 980 additions and 737 deletions

View File

@ -723,7 +723,7 @@ func (s *DockerSuite) TestContainerAPIInvalidPortSyntax(c *check.C) {
c.Assert(err, checker.IsNil)
c.Assert(res.StatusCode, checker.Equals, http.StatusInternalServerError)
b, err := readBody(body)
b, err := integration.ReadBody(body)
c.Assert(err, checker.IsNil)
c.Assert(string(b[:]), checker.Contains, "invalid port")
}
@ -743,7 +743,7 @@ func (s *DockerSuite) TestContainerAPIRestartPolicyInvalidPolicyName(c *check.C)
c.Assert(err, checker.IsNil)
c.Assert(res.StatusCode, checker.Equals, http.StatusInternalServerError)
b, err := readBody(body)
b, err := integration.ReadBody(body)
c.Assert(err, checker.IsNil)
c.Assert(string(b[:]), checker.Contains, "invalid restart policy")
}
@ -763,7 +763,7 @@ func (s *DockerSuite) TestContainerAPIRestartPolicyRetryMismatch(c *check.C) {
c.Assert(err, checker.IsNil)
c.Assert(res.StatusCode, checker.Equals, http.StatusInternalServerError)
b, err := readBody(body)
b, err := integration.ReadBody(body)
c.Assert(err, checker.IsNil)
c.Assert(string(b[:]), checker.Contains, "maximum retry count cannot be used with restart policy")
}
@ -783,7 +783,7 @@ func (s *DockerSuite) TestContainerAPIRestartPolicyNegativeRetryCount(c *check.C
c.Assert(err, checker.IsNil)
c.Assert(res.StatusCode, checker.Equals, http.StatusInternalServerError)
b, err := readBody(body)
b, err := integration.ReadBody(body)
c.Assert(err, checker.IsNil)
c.Assert(string(b[:]), checker.Contains, "maximum retry count cannot be negative")
}
@ -834,7 +834,7 @@ func (s *DockerSuite) TestContainerAPIPostCreateNull(c *check.C) {
c.Assert(err, checker.IsNil)
c.Assert(res.StatusCode, checker.Equals, http.StatusCreated)
b, err := readBody(body)
b, err := integration.ReadBody(body)
c.Assert(err, checker.IsNil)
type createResp struct {
ID string
@ -863,7 +863,7 @@ func (s *DockerSuite) TestCreateWithTooLowMemoryLimit(c *check.C) {
res, body, err := sockRequestRaw("POST", "/containers/create", strings.NewReader(config), "application/json")
c.Assert(err, checker.IsNil)
b, err2 := readBody(body)
b, err2 := integration.ReadBody(body)
c.Assert(err2, checker.IsNil)
c.Assert(res.StatusCode, checker.Equals, http.StatusInternalServerError)