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:
parent
ddfa9a7cc5
commit
ee11771323
|
@ -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())
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue