1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Add pause status check for --kernel-memory

Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
This commit is contained in:
Yuan Sun 2016-04-01 10:32:46 +08:00
parent 4a7bd7eaef
commit 16dfb38fb8

View file

@ -116,8 +116,7 @@ func (s *DockerSuite) TestUpdateContainerWithoutFlags(c *check.C) {
}
func (s *DockerSuite) TestUpdateKernelMemory(c *check.C) {
testRequires(c, DaemonIsLinux)
testRequires(c, kernelMemorySupport)
testRequires(c, DaemonIsLinux, kernelMemorySupport)
name := "test-update-container"
dockerCmd(c, "run", "-d", "--name", name, "--kernel-memory", "50M", "busybox", "top")
@ -128,6 +127,12 @@ func (s *DockerSuite) TestUpdateKernelMemory(c *check.C) {
// Update kernel memory to a running container with failure should not change HostConfig
c.Assert(inspectField(c, name, "HostConfig.KernelMemory"), checker.Equals, "52428800")
dockerCmd(c, "pause", name)
_, _, err = dockerCmdWithError("update", "--kernel-memory", "100M", name)
c.Assert(err, check.NotNil)
c.Assert(inspectField(c, name, "HostConfig.KernelMemory"), checker.Equals, "52428800")
dockerCmd(c, "unpause", name)
dockerCmd(c, "stop", name)
dockerCmd(c, "update", "--kernel-memory", "100M", name)
dockerCmd(c, "start", name)