fix some ineffectual assignments

to make goreportcard a bit happier
https://goreportcard.com/report/github.com/docker/docker

also found that `TestCpToErrDstParentNotExists()` was
partially broken, because a `runDockerCp()` was inadvertently
removed in f26a31e80cfcc77daba0872ddb14bf03f4398311

`TestDaemonRestartSaveContainerExitCode()` didn't verify
the actual _Error_ message, so added that to the test,
and updated the test to take into account that the
"experimental" CI enables `--init` on containers.

`TestVolumeCLICreateOptionConflict()` only checked
for an error to occur, but didn't validate if the
error was due to conflicting options.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: ba0afd70e89562aa3c668c87fb9191ed9edb7260
Component: engine
This commit is contained in:
Sebastiaan van Stijn
2017-01-18 03:08:31 +01:00
parent c6a1cf9cb8
commit 406aff91c7
13 changed files with 38 additions and 19 deletions

View File

@ -76,7 +76,7 @@ func (s *DockerSuite) TestCommitHardlink(c *check.C) {
imageID, _ := dockerCmd(c, "commit", "hardlinks", "hardlinks")
imageID = strings.TrimSpace(imageID)
secondOutput, _ := dockerCmd(c, "run", "-t", "hardlinks", "ls", "-di", "file1", "file2")
secondOutput, _ := dockerCmd(c, "run", "-t", imageID, "ls", "-di", "file1", "file2")
chunks = strings.Split(strings.TrimSpace(secondOutput), " ")
inode = chunks[0]
@ -90,7 +90,7 @@ func (s *DockerSuite) TestCommitTTY(c *check.C) {
imageID, _ := dockerCmd(c, "commit", "tty", "ttytest")
imageID = strings.TrimSpace(imageID)
dockerCmd(c, "run", "ttytest", "/bin/ls")
dockerCmd(c, "run", imageID, "/bin/ls")
}
func (s *DockerSuite) TestCommitWithHostBindMount(c *check.C) {
@ -100,7 +100,7 @@ func (s *DockerSuite) TestCommitWithHostBindMount(c *check.C) {
imageID, _ := dockerCmd(c, "commit", "bind-commit", "bindtest")
imageID = strings.TrimSpace(imageID)
dockerCmd(c, "run", "bindtest", "true")
dockerCmd(c, "run", imageID, "true")
}
func (s *DockerSuite) TestCommitChange(c *check.C) {