From af5b546676cab56e06854a58862e515f17d09d43 Mon Sep 17 00:00:00 2001 From: Sergey Makarov Date: Wed, 15 May 2024 11:23:26 +0200 Subject: [PATCH 1/2] [ISSUE-73] fix error check in http do --- roundtripper.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/roundtripper.go b/roundtripper.go index 33edd7d..5a75fd4 100644 --- a/roundtripper.go +++ b/roundtripper.go @@ -72,7 +72,15 @@ func (it *Test) doRequest(t T, baseReq *http.Request) (*http.Response, error) { } resp, httpErr := it.httpClient.Do(req) + + // http client has case wheh it return response and error in one time + // we have to check this case if resp == nil { + if httpErr != nil { + return nil, cuteErrors.NewCuteError("[HTTP] Could not do request", httpErr) + } + + // if response is nil, we can't get information about request and response return nil, cuteErrors.NewCuteError("[HTTP] Response is nil", httpErr) } From 09adaff8900d5cdb9c7735df296e03345cdf58d7 Mon Sep 17 00:00:00 2001 From: Sergey Makarov Date: Fri, 17 May 2024 09:54:01 +0200 Subject: [PATCH 2/2] [issue-73] update allure --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index c62b16b..120d36d 100644 --- a/go.mod +++ b/go.mod @@ -5,8 +5,8 @@ go 1.21 require ( github.com/josephburnett/jd v1.7.1 github.com/ohler55/ojg v1.21.1 - github.com/ozontech/allure-go/pkg/allure v0.6.13-0.20240320124242-dd7f2ab15350 - github.com/ozontech/allure-go/pkg/framework v0.6.30-0.20240320124242-dd7f2ab15350 + github.com/ozontech/allure-go/pkg/allure v0.6.13 + github.com/ozontech/allure-go/pkg/framework v0.6.31 github.com/stretchr/testify v1.8.4 github.com/xeipuuv/gojsonschema v1.2.0 moul.io/http2curl/v2 v2.3.0 diff --git a/go.sum b/go.sum index d0c0bd5..c3da37e 100644 --- a/go.sum +++ b/go.sum @@ -27,10 +27,10 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWb github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/ohler55/ojg v1.21.1 h1:b2RLUaDcy9gvn46dmhTjezu/TDauoR0/kgKTqkwIxto= github.com/ohler55/ojg v1.21.1/go.mod h1:gQhDVpQLqrmnd2eqGAvJtn+NfKoYJbe/A4Sj3/Vro4o= -github.com/ozontech/allure-go/pkg/allure v0.6.13-0.20240320124242-dd7f2ab15350 h1:IBKoi5yMF3kINxJ5YWRCjitZm2n5jA6kq8qqZu1OmsA= -github.com/ozontech/allure-go/pkg/allure v0.6.13-0.20240320124242-dd7f2ab15350/go.mod h1:4oEG2yq+DGOzJS/ZjPc87C/mx3tAnlYpYonk77Ru/vQ= -github.com/ozontech/allure-go/pkg/framework v0.6.30-0.20240320124242-dd7f2ab15350 h1:QYE7DoTcAIKDd0BKe9epSK8j9bwOaQx0zS4zoGe7LlE= -github.com/ozontech/allure-go/pkg/framework v0.6.30-0.20240320124242-dd7f2ab15350/go.mod h1:ZNUnhean4TKmDwHPX2Jwr3y/o0WTeyuXB9aKKRcyHBg= +github.com/ozontech/allure-go/pkg/allure v0.6.13 h1:vkLSIvOEERHTxe+oq8DXDu/m+kLnVUkrXNN8xTKuKU4= +github.com/ozontech/allure-go/pkg/allure v0.6.13/go.mod h1:4oEG2yq+DGOzJS/ZjPc87C/mx3tAnlYpYonk77Ru/vQ= +github.com/ozontech/allure-go/pkg/framework v0.6.31 h1:u32AqB9/JkzcL5vSl8PSUmMZbsVTmoriDylI3FIYgX4= +github.com/ozontech/allure-go/pkg/framework v0.6.31/go.mod h1:wfqY4e4+w4BoRFDxHp7TNcdWfcCOWJV3BjrUqUughWY= github.com/pkg/diff v0.0.0-20200914180035-5b29258ca4f7/go.mod h1:zO8QMzTeZd5cpnIkz/Gn6iK0jDfGicM1nynOkkPIl28= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=