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

Do not set -1 for swappiness

Do not set a default value for swappiness as the default value should be
`nil`

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2017-06-30 10:34:40 -07:00
parent 8bc681262f
commit 9d87e6e0fb
5 changed files with 16 additions and 10 deletions

View File

@ -1448,7 +1448,7 @@ func (s *DockerSuite) TestPostContainersCreateMemorySwappinessHostConfigOmitted(
var containerJSON types.ContainerJSON
c.Assert(json.Unmarshal(body, &containerJSON), check.IsNil)
c.Assert(*containerJSON.HostConfig.MemorySwappiness, check.Equals, int64(-1))
c.Assert(containerJSON.HostConfig.MemorySwappiness, check.IsNil)
}
// check validation is done daemon side and not only in cli