pkg/proc: add missing response body Close in test (#3355)

This commit is contained in:
Oleksandr Redko 2023-05-04 14:59:16 +03:00 committed by GitHub
parent f3bfa7c177
commit a3b053df86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2917,6 +2917,7 @@ func TestAttachDetach(t *testing.T) {
assertNoError(err, t, "Page request after detach")
bs, err := ioutil.ReadAll(resp.Body)
assertNoError(err, t, "Reading /nobp page")
defer resp.Body.Close()
if out := string(bs); !strings.Contains(out, "hello, world!") {
t.Fatalf("/nobp page does not contain \"hello, world!\": %q", out)
}