1
0
mirror of https://github.com/moby/moby.git synced 2025-07-29 07:21:35 +03:00

integration-cli: normalize comment formatting

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2019-11-27 15:36:45 +01:00
parent a4a0429eec
commit 580d3677c8
15 changed files with 64 additions and 71 deletions

View File

@ -210,26 +210,21 @@ func (s *DockerSuite) TestBuildAPIUnnormalizedTarPaths(c *testing.T) {
Name: "Dockerfile",
Size: int64(len(dockerfile)),
})
//failed to write tar file header
assert.NilError(c, err)
assert.NilError(c, err, "failed to write tar file header")
_, err = tw.Write(dockerfile)
// failed to write Dockerfile in tar file content
assert.NilError(c, err)
assert.NilError(c, err, "failed to write Dockerfile in tar file content")
err = tw.WriteHeader(&tar.Header{
Name: "dir/./file",
Size: int64(len(fileContents)),
})
//failed to write tar file header
assert.NilError(c, err)
assert.NilError(c, err, "failed to write tar file header")
_, err = tw.Write(fileContents)
// failed to write file contents in tar file content
assert.NilError(c, err)
assert.NilError(c, err, "failed to write file contents in tar file content")
// failed to close tar archive
assert.NilError(c, tw.Close())
assert.NilError(c, tw.Close(), "failed to close tar archive")
res, body, err := request.Post("/build", request.RawContent(ioutil.NopCloser(buffer)), request.ContentType("application/x-tar"))
assert.NilError(c, err)