mirror of
https://github.com/docker/cli.git
synced 2026-09-27 09:46:01 -04:00
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:
@@ -459,12 +459,11 @@ func (s *DockerRegistrySuite) TestRunImplicitPullWithNoTag(c *check.C) {
|
||||
dockerCmd(c, "rmi", repoTag1)
|
||||
dockerCmd(c, "rmi", repoTag2)
|
||||
|
||||
out, _, err := dockerCmdWithError("run", repo)
|
||||
c.Assert(err, check.IsNil)
|
||||
out, _ := dockerCmd(c, "run", repo)
|
||||
c.Assert(out, checker.Contains, fmt.Sprintf("Unable to find image '%s:latest' locally", repo))
|
||||
|
||||
// There should be only one line for repo, the one with repo:latest
|
||||
outImageCmd, _, err := dockerCmdWithError("images", repo)
|
||||
outImageCmd, _ := dockerCmd(c, "images", repo)
|
||||
splitOutImageCmd := strings.Split(strings.TrimSpace(outImageCmd), "\n")
|
||||
c.Assert(splitOutImageCmd, checker.HasLen, 2)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user