mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-03 12:11:41 +00:00
Merge pull request #16413 from sunyuan3/TestRunSwapMoreThanMemoryLimit
Add the TestRunSwapMoreThanMemoryLimit case.
This commit is contained in:
@@ -338,3 +338,15 @@ func (s *DockerSuite) TestStopContainerSignal(c *check.C) {
|
||||
c.Fatalf("Expected `exit trapped` in the log, got %v", out)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *DockerSuite) TestRunSwapLessThanMemoryLimit(c *check.C) {
|
||||
testRequires(c, memoryLimitSupport)
|
||||
testRequires(c, swapMemorySupport)
|
||||
out, _, err := dockerCmdWithError("run", "-m", "16m", "--memory-swap", "15m", "busybox", "echo", "test")
|
||||
expected := "Minimum memoryswap limit should be larger than memory limit"
|
||||
c.Assert(err, check.NotNil)
|
||||
|
||||
if !strings.Contains(out, expected) {
|
||||
c.Fatalf("Expected output to contain %q, not %q", out, expected)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user