зеркало из https://github.com/microsoft/docker.git
Update TestRunWithSwappinessInvalid.
Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
This commit is contained in:
Родитель
9324b154d2
Коммит
3571814dc5
|
@ -322,9 +322,13 @@ func (s *DockerSuite) TestRunWithSwappiness(c *check.C) {
|
|||
func (s *DockerSuite) TestRunWithSwappinessInvalid(c *check.C) {
|
||||
testRequires(c, memorySwappinessSupport)
|
||||
out, _, err := dockerCmdWithError("run", "--memory-swappiness", "101", "busybox", "true")
|
||||
if err == nil {
|
||||
c.Fatalf("failed. test was able to set invalid value, output: %q", out)
|
||||
}
|
||||
c.Assert(err, check.NotNil)
|
||||
expected := "Valid memory swappiness range is 0-100"
|
||||
c.Assert(out, checker.Contains, expected, check.Commentf("Expected output to contain %q, not %q", out, expected))
|
||||
|
||||
out, _, err = dockerCmdWithError("run", "--memory-swappiness", "-10", "busybox", "true")
|
||||
c.Assert(err, check.NotNil)
|
||||
c.Assert(out, checker.Contains, expected, check.Commentf("Expected output to contain %q, not %q", out, expected))
|
||||
}
|
||||
|
||||
func (s *DockerSuite) TestRunWithMemoryReservation(c *check.C) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче