diff options
author | Sebastiaan van Stijn <github@gone.nl> | 2017-01-18 03:08:31 +0100 |
---|---|---|
committer | Sebastiaan van Stijn <github@gone.nl> | 2017-01-24 11:16:19 +0100 |
commit | ba0afd70e89562aa3c668c87fb9191ed9edb7260 (patch) | |
tree | 3897d6cd2463d256e3e7e11d2ddfa204b7f932ec /integration-cli/docker_cli_cp_test.go | |
parent | 8820266c17beede7d08b6b077383978f3b7b239f (diff) | |
download | docker-ba0afd70e89562aa3c668c87fb9191ed9edb7260.tar.gz |
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>
Diffstat (limited to 'integration-cli/docker_cli_cp_test.go')
-rw-r--r-- | integration-cli/docker_cli_cp_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/integration-cli/docker_cli_cp_test.go b/integration-cli/docker_cli_cp_test.go index 510f94e654..e9300654e6 100644 --- a/integration-cli/docker_cli_cp_test.go +++ b/integration-cli/docker_cli_cp_test.go @@ -442,6 +442,7 @@ func (s *DockerSuite) TestCpSpecialFiles(c *check.C) { expected, err = readContainerFile(containerID, "hostname") actual, err = ioutil.ReadFile(outDir + "/hostname") + c.Assert(err, checker.IsNil) // Expected copied file to be duplicate of the container resolvconf c.Assert(bytes.Equal(actual, expected), checker.True) @@ -534,6 +535,7 @@ func (s *DockerSuite) TestCpToDot(c *check.C) { c.Assert(os.Chdir(tmpdir), checker.IsNil) dockerCmd(c, "cp", containerID+":/test", ".") content, err := ioutil.ReadFile("./test") + c.Assert(err, checker.IsNil) c.Assert(string(content), checker.Equals, "lololol\n") } @@ -572,6 +574,7 @@ func (s *DockerSuite) TestCpNameHasColon(c *check.C) { defer os.RemoveAll(tmpdir) dockerCmd(c, "cp", containerID+":/te:s:t", tmpdir) content, err := ioutil.ReadFile(tmpdir + "/te:s:t") + c.Assert(err, checker.IsNil) c.Assert(string(content), checker.Equals, "lololol\n") } @@ -653,6 +656,7 @@ func (s *DockerSuite) TestCpSymlinkFromConToHostFollowSymlink(c *check.C) { dockerCmd(c, "cp", "-L", cleanedContainerID+":"+"/dir_link", expectedPath) actual, err = ioutil.ReadFile(expectedPath) + c.Assert(err, checker.IsNil) if !bytes.Equal(actual, expected) { c.Fatalf("Expected copied file to be duplicate of the container symbol link target") |