mirror of
https://github.com/moby/moby.git
synced 2025-12-04 19:23:06 +03:00
integration: remove KernelMemory tests
Starting with runc v1.0.0-rc94, runc no longer supports KernelMemory.
52390d6804
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
committed by
Jintao Zhang
parent
8c019e830a
commit
2f0d6664a1
@@ -495,33 +495,6 @@ func (s *DockerSuite) TestRunWithInvalidCpuPeriod(c *testing.T) {
|
||||
assert.Assert(c, strings.Contains(out, expected))
|
||||
}
|
||||
|
||||
func (s *DockerSuite) TestRunWithKernelMemory(c *testing.T) {
|
||||
testRequires(c, DaemonIsLinux, kernelMemorySupport)
|
||||
|
||||
file := "/sys/fs/cgroup/memory/memory.kmem.limit_in_bytes"
|
||||
cli.DockerCmd(c, "run", "--kernel-memory", "50M", "--name", "test1", "busybox", "cat", file).Assert(c, icmd.Expected{
|
||||
Out: "52428800",
|
||||
})
|
||||
|
||||
cli.InspectCmd(c, "test1", cli.Format(".HostConfig.KernelMemory")).Assert(c, icmd.Expected{
|
||||
Out: "52428800",
|
||||
})
|
||||
}
|
||||
|
||||
func (s *DockerSuite) TestRunWithInvalidKernelMemory(c *testing.T) {
|
||||
testRequires(c, DaemonIsLinux, kernelMemorySupport)
|
||||
|
||||
out, _, err := dockerCmdWithError("run", "--kernel-memory", "2M", "busybox", "true")
|
||||
assert.ErrorContains(c, err, "")
|
||||
expected := "Minimum kernel memory limit allowed is 4MB"
|
||||
assert.Assert(c, strings.Contains(out, expected))
|
||||
|
||||
out, _, err = dockerCmdWithError("run", "--kernel-memory", "-16m", "--name", "test2", "busybox", "echo", "test")
|
||||
assert.ErrorContains(c, err, "")
|
||||
expected = "invalid size"
|
||||
assert.Assert(c, strings.Contains(out, expected))
|
||||
}
|
||||
|
||||
func (s *DockerSuite) TestRunWithCPUShares(c *testing.T) {
|
||||
testRequires(c, cpuShare)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user