mirror of
https://github.com/moby/moby.git
synced 2025-07-29 07:21:35 +03:00
integration: use %s for check.Commentf()
It is wrong to pass an arbitrary string to a function expecting %-style formatting. One solution would be to replace any % with %%, but it's easier to just do what this patch does. Generated with: for f in $(git grep -l 'check.Commentf(out)'); do \ sed -i -e 's/check\.Commentf(out)/check.Commentf("%s", out)/g' $f; \ done Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@ -75,7 +75,7 @@ func (s *DockerSuite) TestCreateShrinkRootfs(c *check.C) {
|
||||
|
||||
// Ensure this fails because of the defaultBaseFsSize is 10G
|
||||
out, _, err := dockerCmdWithError("create", "--storage-opt", "size=5G", "busybox")
|
||||
c.Assert(err, check.NotNil, check.Commentf(out))
|
||||
c.Assert(err, check.NotNil, check.Commentf("%s", out))
|
||||
c.Assert(out, checker.Contains, "Container size cannot be smaller than")
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user