pkg/proc: add missing response body Close in test (#3355)
This commit is contained in:
parent
f3bfa7c177
commit
a3b053df86
@ -2917,6 +2917,7 @@ func TestAttachDetach(t *testing.T) {
|
|||||||
assertNoError(err, t, "Page request after detach")
|
assertNoError(err, t, "Page request after detach")
|
||||||
bs, err := ioutil.ReadAll(resp.Body)
|
bs, err := ioutil.ReadAll(resp.Body)
|
||||||
assertNoError(err, t, "Reading /nobp page")
|
assertNoError(err, t, "Reading /nobp page")
|
||||||
|
defer resp.Body.Close()
|
||||||
if out := string(bs); !strings.Contains(out, "hello, world!") {
|
if out := string(bs); !strings.Contains(out, "hello, world!") {
|
||||||
t.Fatalf("/nobp page does not contain \"hello, world!\": %q", out)
|
t.Fatalf("/nobp page does not contain \"hello, world!\": %q", out)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user