command/agent: check err before close (#12574)

This commit is contained in:
Lars Lehtonen 2022-04-15 05:54:03 -07:00 committed by GitHub
parent 70a04dd106
commit 81bb1ef030
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -1113,9 +1113,8 @@ func TestHTTPServer_Limits_OK(t *testing.T) {
conf.Address = a.HTTPAddr()
conf.TLSConfig.Insecure = true
client, err := api.NewClient(conf)
defer client.Close()
require.NoError(t, err)
defer client.Close()
// Assert a blocking query isn't timed out by the
// handshake timeout