Merge pull request #21960 from rhcarvalho/shm-validation-typo

Fix a typo in hostConfig.ShmSize validation
Upstream-commit: 595104daf67e9004ce771419a076b491345b5778
Component: engine
This commit is contained in:
Phil Estes
2016-04-12 12:05:31 -04:00
2 changed files with 2 additions and 2 deletions

View File

@ -525,7 +525,7 @@ func verifyPlatformContainerSettings(daemon *Daemon, hostConfig *containertypes.
warnings = append(warnings, w...)
if hostConfig.ShmSize < 0 {
return warnings, fmt.Errorf("SHM size must be greater then 0")
return warnings, fmt.Errorf("SHM size must be greater than 0")
}
if hostConfig.OomScoreAdj < -1000 || hostConfig.OomScoreAdj > 1000 {

View File

@ -1462,7 +1462,7 @@ func (s *DockerSuite) TestPostContainersCreateShmSizeNegative(c *check.C) {
status, body, err := sockRequest("POST", "/containers/create", config)
c.Assert(err, check.IsNil)
c.Assert(status, check.Equals, http.StatusInternalServerError)
c.Assert(string(body), checker.Contains, "SHM size must be greater then 0")
c.Assert(string(body), checker.Contains, "SHM size must be greater than 0")
}
func (s *DockerSuite) TestPostContainersCreateShmSizeHostConfigOmitted(c *check.C) {