fix: add response closures to web_test.go (#10675)

* fix: add response closures to web_test.go

Signed-off-by: mtfoley <mtfoley.mae@gmail.com>
This commit is contained in:
Matthew 2022-06-17 03:55:52 -04:00 committed by GitHub
parent ddfa9a7cc5
commit ee11771323
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -566,6 +566,9 @@ func TestAgentAPIEndPoints(t *testing.T) {
resp, err := http.DefaultClient.Do(req)
require.NoError(t, err)
require.Equal(t, http.StatusUnprocessableEntity, resp.StatusCode)
t.Cleanup(func() {
require.NoError(t, resp.Body.Close())
})
}
}
@ -584,6 +587,9 @@ func TestAgentAPIEndPoints(t *testing.T) {
resp, err := http.DefaultClient.Do(req)
require.NoError(t, err)
require.Equal(t, http.StatusOK, resp.StatusCode)
t.Cleanup(func() {
require.NoError(t, resp.Body.Close())
})
}
}
}