From 74cd3a9c1c2d3d3b5203aca3a95e2a8f2ba582aa Mon Sep 17 00:00:00 2001 From: Sergey Date: Sun, 28 Jul 2024 23:39:04 +0300 Subject: [PATCH] chore: fixed flaky test --- pkg/app_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/app_test.go b/pkg/app_test.go index 883f401..2ebb77b 100644 --- a/pkg/app_test.go +++ b/pkg/app_test.go @@ -73,7 +73,9 @@ func TestAppLoadConfigOk(t *testing.T) { for { request, err := http.Get("http://localhost:9560/healthcheck") - _ = request.Body.Close() + if request.Body != nil { + _ = request.Body.Close() + } if err == nil { break }