mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00: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:
@@ -243,7 +243,7 @@ func (s *DockerSuite) TestCpFromSymlinkToDirectory(c *check.C) {
|
||||
if err == nil {
|
||||
out = fmt.Sprintf("target name was copied: %q - %q", stat.Mode(), stat.Name())
|
||||
}
|
||||
c.Assert(err, checker.NotNil, check.Commentf(out))
|
||||
c.Assert(err, checker.NotNil, check.Commentf("%s", out))
|
||||
|
||||
// It *should* have copied the directory using the asked name "dir_link".
|
||||
stat, err = os.Lstat(expectedPath)
|
||||
@@ -315,7 +315,7 @@ func (s *DockerSuite) TestCpToSymlinkToDirectory(c *check.C) {
|
||||
if err == nil {
|
||||
out = fmt.Sprintf("target name was copied: %q - %q", stat.Mode(), stat.Name())
|
||||
}
|
||||
c.Assert(err, checker.NotNil, check.Commentf(out))
|
||||
c.Assert(err, checker.NotNil, check.Commentf("%s", out))
|
||||
|
||||
// It *should* have copied the directory using the asked name "dir_link".
|
||||
stat, err = os.Lstat(expectedPath)
|
||||
|
||||
Reference in New Issue
Block a user