TestGraphdriverPluginV2: SA5001: should check returned error before deferring (staticcheck)
``` integration/plugin/graphdriver/external_test.go:427:2: SA5001: should check returned error before deferring responseReader.Close() (staticcheck) ``` Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
fd65fed81b
commit
5358c95a76
1 changed files with 1 additions and 1 deletions
|
@ -424,8 +424,8 @@ func TestGraphdriverPluginV2(t *testing.T) {
|
||||||
RemoteRef: plugin,
|
RemoteRef: plugin,
|
||||||
AcceptAllPermissions: true,
|
AcceptAllPermissions: true,
|
||||||
})
|
})
|
||||||
defer responseReader.Close()
|
|
||||||
assert.NilError(t, err)
|
assert.NilError(t, err)
|
||||||
|
defer responseReader.Close()
|
||||||
// ensure it's done by waiting for EOF on the response
|
// ensure it's done by waiting for EOF on the response
|
||||||
_, err = io.Copy(ioutil.Discard, responseReader)
|
_, err = io.Copy(ioutil.Discard, responseReader)
|
||||||
assert.NilError(t, err)
|
assert.NilError(t, err)
|
||||||
|
|
Loading…
Reference in a new issue