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

Merge pull request #18285 from hqhq/hq_fix_swappiness

Set default MemorySwappiness when adapt
This commit is contained in:
Brian Goff
2015-12-02 14:25:08 -05:00
6 changed files with 31 additions and 24 deletions

View File

@ -1434,7 +1434,7 @@ func (s *DockerSuite) TestPostContainersCreateShmSizeHostConfigOmitted(c *check.
var containerJSON types.ContainerJSON
c.Assert(json.Unmarshal(body, &containerJSON), check.IsNil)
c.Assert(containerJSON.HostConfig.ShmSize, check.IsNil)
c.Assert(*containerJSON.HostConfig.ShmSize, check.Equals, runconfig.DefaultSHMSize)
out, _ := dockerCmd(c, "start", "-i", containerJSON.ID)
shmRegexp := regexp.MustCompile(`shm on /dev/shm type tmpfs(.*)size=65536k`)
@ -1522,5 +1522,5 @@ func (s *DockerSuite) TestPostContainersCreateMemorySwappinessHostConfigOmitted(
var containerJSON types.ContainerJSON
c.Assert(json.Unmarshal(body, &containerJSON), check.IsNil)
c.Assert(containerJSON.HostConfig.MemorySwappiness, check.IsNil)
c.Assert(*containerJSON.HostConfig.MemorySwappiness, check.Equals, int64(-1))
}