1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

ineffassign: fix unused variables

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2018-01-13 13:35:10 +01:00
parent 6415f1dcf5
commit 63a0e88e8a
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C
3 changed files with 5 additions and 4 deletions

View file

@ -460,6 +460,7 @@ COPY file /file`
assert.Equal(c, http.StatusOK, res.StatusCode) assert.Equal(c, http.StatusOK, res.StatusCode)
out, err := request.ReadBody(body) out, err := request.ReadBody(body)
require.NoError(c, err)
ids := getImageIDsFromBuild(c, out) ids := getImageIDsFromBuild(c, out)
return ids[len(ids)-1] return ids[len(ids)-1]
@ -498,6 +499,7 @@ ADD file /file`
assert.Equal(c, http.StatusOK, res.StatusCode) assert.Equal(c, http.StatusOK, res.StatusCode)
out, err := request.ReadBody(body) out, err := request.ReadBody(body)
require.NoError(c, err)
ids := getImageIDsFromBuild(c, out) ids := getImageIDsFromBuild(c, out)
return ids[len(ids)-1] return ids[len(ids)-1]

View file

@ -1031,7 +1031,7 @@ func (s *DockerSwarmSuite) TestAPINetworkInspectWithScope(c *check.C) {
v := url.Values{} v := url.Values{}
v.Set("scope", "local") v.Set("scope", "local")
status, body, err = d.SockRequest("GET", "/networks/"+name+"?"+v.Encode(), nil) status, _, err = d.SockRequest("GET", "/networks/"+name+"?"+v.Encode(), nil)
c.Assert(err, checker.IsNil, check.Commentf(string(out))) c.Assert(err, checker.IsNil, check.Commentf(string(out)))
c.Assert(status, checker.Equals, http.StatusNotFound, check.Commentf(string(out))) c.Assert(status, checker.Equals, http.StatusNotFound, check.Commentf(string(out)))
} }

View file

@ -467,9 +467,8 @@ func (s *DockerDaemonSuite) TestDaemonIPv6HostMode(c *check.C) {
c.Assert(err, checker.IsNil, check.Commentf("Could not run container: %s, %v", out, err)) c.Assert(err, checker.IsNil, check.Commentf("Could not run container: %s, %v", out, err))
out, err = s.d.Cmd("exec", "hostcnt", "ip", "-6", "addr", "show", "docker0") out, err = s.d.Cmd("exec", "hostcnt", "ip", "-6", "addr", "show", "docker0")
out = strings.Trim(out, " \r\n'") c.Assert(err, checker.IsNil)
c.Assert(strings.Trim(out, " \r\n'"), checker.Contains, "2001:db8:2::1")
c.Assert(out, checker.Contains, "2001:db8:2::1")
} }
func (s *DockerDaemonSuite) TestDaemonLogLevelWrong(c *check.C) { func (s *DockerDaemonSuite) TestDaemonLogLevelWrong(c *check.C) {