pkg/proc,pkg/terminal: close response body in tests (#3372)

This commit is contained in:
Oleksandr Redko
2023-05-17 13:01:26 +03:00
committed by GitHub
parent 84b757ad57
commit c5d9baaeb6
2 changed files with 12 additions and 3 deletions

View File

@ -693,7 +693,10 @@ func TestIssue827(t *testing.T) {
withTestTerminal("notify-v2", t, func(term *FakeTerminal) {
go func() {
time.Sleep(1 * time.Second)
http.Get("http://127.0.0.1:8888/test")
resp, err := http.Get("http://127.0.0.1:8888/test")
if err == nil {
resp.Body.Close()
}
time.Sleep(1 * time.Second)
term.client.Halt()
}()