diff options
author | Sebastiaan van Stijn <github@gone.nl> | 2019-09-11 19:21:18 +0200 |
---|---|---|
committer | Sebastiaan van Stijn <github@gone.nl> | 2019-09-18 12:57:55 +0200 |
commit | 5358c95a76ed9dc51116ec2b83cd8da5ea9fd544 (patch) | |
tree | c0f9a959e2241f59ddbe8f07d722a8c29b2c9e12 /integration/plugin | |
parent | fd65fed81bdc5b50b89c3c3ec4f733562564e190 (diff) | |
download | docker-5358c95a76ed9dc51116ec2b83cd8da5ea9fd544.tar.gz |
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>
Diffstat (limited to 'integration/plugin')
-rw-r--r-- | integration/plugin/graphdriver/external_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/integration/plugin/graphdriver/external_test.go b/integration/plugin/graphdriver/external_test.go index d72210be3e..dce8efc354 100644 --- a/integration/plugin/graphdriver/external_test.go +++ b/integration/plugin/graphdriver/external_test.go @@ -424,8 +424,8 @@ func TestGraphdriverPluginV2(t *testing.T) { RemoteRef: plugin, AcceptAllPermissions: true, }) - defer responseReader.Close() assert.NilError(t, err) + defer responseReader.Close() // ensure it's done by waiting for EOF on the response _, err = io.Copy(ioutil.Discard, responseReader) assert.NilError(t, err) |