Browse code

update TestRunWithBlkioInvalidWeight

Signed-off-by: Yuan Sun <sunyuan3@huawei.com>

Yuan Sun authored on 2015/10/14 17:20:52
Showing 1 changed files
... ...
@@ -272,9 +272,10 @@ func (s *DockerSuite) TestRunWithBlkioWeight(c *check.C) {
272 272
 
273 273
 func (s *DockerSuite) TestRunWithBlkioInvalidWeight(c *check.C) {
274 274
 	testRequires(c, blkioWeight)
275
-	if _, _, err := dockerCmdWithError("run", "--blkio-weight", "5", "busybox", "true"); err == nil {
276
-		c.Fatalf("run with invalid blkio-weight should failed")
277
-	}
275
+	out, _, err := dockerCmdWithError("run", "--blkio-weight", "5", "busybox", "true")
276
+	c.Assert(err, check.NotNil, check.Commentf(out))
277
+	expected := "Range of blkio weight is from 10 to 1000"
278
+	c.Assert(out, checker.Contains, expected)
278 279
 }
279 280
 
280 281
 func (s *DockerSuite) TestRunOOMExitCode(c *check.C) {