Skip to content

Commit

Permalink
[ISSUE-59] update libs (#60)
Browse files Browse the repository at this point in the history
* [ISSUE-59] update libs

* [ISSUE-59] fix linter

* [ISSUE-59] fix ci
  • Loading branch information
siller174 authored Feb 5, 2024
1 parent 3cb1346 commit 97a43ec
Show file tree
Hide file tree
Showing 17 changed files with 95 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.21

- name: Build
run: go build -v ./...
Expand Down
21 changes: 21 additions & 0 deletions allure.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,19 @@ func (qt *cute) setLinksAllure(t linksAllureProvider) {
if qt.allureLinks.issue != "" {
t.SetIssue(qt.allureLinks.issue)
}

if qt.allureLinks.testCase != "" {
t.SetTestCase(qt.allureLinks.testCase)
}

if qt.allureLinks.link != nil {
t.Link(qt.allureLinks.link)
}

if qt.allureLinks.tmsLink != "" {
t.TmsLink(qt.allureLinks.tmsLink)
}

if len(qt.allureLinks.tmsLinks) > 0 {
t.TmsLinks(qt.allureLinks.tmsLinks...)
}
Expand All @@ -29,48 +33,63 @@ func (qt *cute) setLabelsAllure(t labelsAllureProvider) {
if qt.allureLabels.id != "" {
t.ID(qt.allureLabels.id)
}

if qt.allureLabels.suiteLabel != "" {
t.AddSuiteLabel(qt.allureLabels.suiteLabel)
}

if qt.allureLabels.subSuite != "" {
t.AddSubSuite(qt.allureLabels.subSuite)
}

if qt.allureLabels.parentSuite != "" {
t.AddParentSuite(qt.allureLabels.parentSuite)
}

if qt.allureLabels.story != "" {
t.Story(qt.allureLabels.story)
}

if qt.allureLabels.tag != "" {
t.Tag(qt.allureLabels.tag)
}

if qt.allureLabels.allureID != "" {
t.AllureID(qt.allureLabels.allureID)
}

if qt.allureLabels.severity != "" {
t.Severity(qt.allureLabels.severity)
}

if qt.allureLabels.owner != "" {
t.Owner(qt.allureLabels.owner)
}

if qt.allureLabels.lead != "" {
t.Lead(qt.allureLabels.lead)
}

if qt.allureLabels.label != nil {
t.Label(qt.allureLabels.label)
}

if len(qt.allureLabels.labels) != 0 {
t.Labels(qt.allureLabels.labels...)
}

if qt.allureLabels.feature != "" {
t.Feature(qt.allureLabels.feature)
}

if qt.allureLabels.epic != "" {
t.Epic(qt.allureLabels.epic)
}

if len(qt.allureLabels.tags) != 0 {
t.Tags(qt.allureLabels.tags...)
}

if qt.allureLabels.layer != "" {
t.Layer(qt.allureLabels.layer)
}
Expand All @@ -80,9 +99,11 @@ func (qt *cute) setInfoAllure(t infoAllureProvider) {
if qt.allureInfo.title != "" {
t.Title(qt.allureInfo.title)
}

if qt.allureInfo.description != "" {
t.Description(qt.allureInfo.description)
}

if qt.allureInfo.stage != "" {
t.Stage(qt.allureInfo.stage)
}
Expand Down
2 changes: 2 additions & 0 deletions asserts/json/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,9 @@ func isEmpty(object interface{}) bool {
if objValue.IsNil() {
return true
}

deref := objValue.Elem().Interface()

return isEmpty(deref)
case reflect.Array, reflect.Chan, reflect.Map, reflect.Slice:
return objValue.Len() == 0
Expand Down
1 change: 1 addition & 0 deletions builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ type options struct {
middleware *Middleware
}

// Option ...
type Option func(*options)

// WithHTTPClient is a function for set custom http client
Expand Down
10 changes: 5 additions & 5 deletions builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func TestHTTPTestMaker(t *testing.T) {
allureID = "AllureID"
owner = "Owner"
lead = "Lead"
label = &allure.Label{"kek", "lol"}
label = &allure.Label{Name: "kek", Value: "lol"}
setIssue = "SetIssue"
setTestCase = "SetTestCase"
repeatCount = 10
Expand Down Expand Up @@ -354,10 +354,10 @@ func TestCreateDefaultTest(t *testing.T) {
Name: "",
AllureStep: new(AllureStep),
Middleware: &Middleware{
After: make([]AfterExecute, 0, 0),
AfterT: make([]AfterExecuteT, 0, 0),
Before: make([]BeforeExecute, 0, 0),
BeforeT: make([]BeforeExecuteT, 0, 0),
After: make([]AfterExecute, 0),
AfterT: make([]AfterExecuteT, 0),
Before: make([]BeforeExecute, 0),
BeforeT: make([]BeforeExecuteT, 0),
},
Request: &Request{
Repeat: new(RequestRepeatPolitic),
Expand Down
1 change: 1 addition & 0 deletions cute.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ func createAllureT(t *testing.T) *common.Common {
WithRunner(callers[0])
newProvider = manager.NewProvider(providerCfg)
)

newProvider.NewTest(t.Name(), "package")

newT.SetProvider(newProvider)
Expand Down
19 changes: 10 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
module github.com/ozontech/cute

go 1.19
go 1.21

require (
github.com/josephburnett/jd v1.5.1
github.com/ohler55/ojg v1.19.4
github.com/ozontech/allure-go/pkg/allure v0.6.11
github.com/ozontech/allure-go/pkg/framework v0.6.28
github.com/stretchr/testify v1.7.1
github.com/josephburnett/jd v1.7.1
github.com/ohler55/ojg v1.21.1
github.com/ozontech/allure-go/pkg/allure v0.6.12
github.com/ozontech/allure-go/pkg/framework v0.6.29
github.com/stretchr/testify v1.8.4
github.com/xeipuuv/gojsonschema v1.2.0
moul.io/http2curl/v2 v2.3.0
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/swag v0.19.5 // indirect
github.com/go-openapi/swag v0.21.1 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
45 changes: 28 additions & 17 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,28 +1,36 @@
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY=
github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
github.com/go-openapi/swag v0.19.5 h1:lTz6Ys4CmqqCQmZPBlbQENR1/GucA2bzYTE12Pw4tFY=
github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
github.com/go-openapi/swag v0.21.1 h1:wm0rhTb5z7qpJRHBdPOMuY4QjVUMbF6/kwoYeRAOrKU=
github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/josephburnett/jd v1.5.1 h1:6V6C5rMl1RCea2EuufPuGS+rSfJetRXl//R5XJz19AA=
github.com/josephburnett/jd v1.5.1/go.mod h1:2pSZGHitQCumXDDTxmJehndlsltrTeVAhrzP8WfFeuc=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/josephburnett/jd v1.7.1 h1:oXBPMS+SNnILTMGj1fWLK9pexpeJUXtbVFfRku/PjBU=
github.com/josephburnett/jd v1.7.1/go.mod h1:R8ZnZnLt2D4rhW4NvBc/USTo6mzyNT6fYNIIWOJA9GY=
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e h1:hB2xlXdHp/pmPZq0y3QnmWAArdw9PqbmotexnWx/FU8=
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/ohler55/ojg v1.19.4 h1:ZIgfyHI83aLx+fi1VoKn4I80HqWo45usWKnnxw94Mro=
github.com/ohler55/ojg v1.19.4/go.mod h1:uHcD1ErbErC27Zhb5Df2jUjbseLLcmOCo6oxSr3jZxo=
github.com/ozontech/allure-go/pkg/allure v0.6.11 h1:1g8jCTLSI7hcAQBXwMx8HoKaVwErRPcWqSrjVGgv+Nk=
github.com/ozontech/allure-go/pkg/allure v0.6.11/go.mod h1:4oEG2yq+DGOzJS/ZjPc87C/mx3tAnlYpYonk77Ru/vQ=
github.com/ozontech/allure-go/pkg/framework v0.6.28 h1:ZYPPtGDANRkbneo0lMvlM17xix1YO2jHgZu8iuIL9Q8=
github.com/ozontech/allure-go/pkg/framework v0.6.28/go.mod h1:aFyaKnv9vtiX5ZNaOJxwVA46glCsLNeueZDtmu3eGW0=
github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
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.12 h1:O9VTf7fW9q/c9qKidQ3CGRCXBC4c8MR7NZW+oVm7Uz4=
github.com/ozontech/allure-go/pkg/allure v0.6.12/go.mod h1:4oEG2yq+DGOzJS/ZjPc87C/mx3tAnlYpYonk77Ru/vQ=
github.com/ozontech/allure-go/pkg/framework v0.6.29 h1:RzOXLMEg/O1K8+mqbKtorqqmlmEYtq94H4XH7aSvn14=
github.com/ozontech/allure-go/pkg/framework v0.6.29/go.mod h1:ZNUnhean4TKmDwHPX2Jwr3y/o0WTeyuXB9aKKRcyHBg=
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=
Expand All @@ -32,8 +40,9 @@ github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAm
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tailscale/depaware v0.0.0-20210622194025-720c4b409502/go.mod h1:p9lPsd+cx33L3H9nNoecRRxPssFKUwwI50I3pZ0yT+8=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
Expand Down Expand Up @@ -64,13 +73,15 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0 h1:hjy8E9ON/egN1tAYqKb61G10WtihqetD4sz2H+8nIeA=
gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
moul.io/http2curl/v2 v2.3.0 h1:9r3JfDzWPcbIklMOs2TnIFzDYvfAZvjeavG6EzP7jYs=
moul.io/http2curl/v2 v2.3.0/go.mod h1:RW4hyBjTWSYDOxapodpNEtX0g5Eb16sxklBqmd2RHcE=
2 changes: 2 additions & 0 deletions init.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ func init() {
commonBuilder = NewHTTPTestMaker()
}

// NewTestBuilder is function for create base test builder,
// For create custom test builder use NewHTTPTestMaker()
func NewTestBuilder() AllureBuilder {
return commonBuilder.NewTestBuilder()
}
4 changes: 4 additions & 0 deletions interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ type AllureBuilder interface {
Parallel() AllureBuilder
}

// AllureInfoBuilder ...
type AllureInfoBuilder interface {
// Title is a function for set title in allure information
Title(title string) AllureBuilder
Expand All @@ -32,6 +33,7 @@ type AllureInfoBuilder interface {
Stagef(format string, args ...interface{}) AllureBuilder
}

// AllureLinksBuilder ...
type AllureLinksBuilder interface {
SetIssue(issue string) AllureBuilder
SetTestCase(testCase string) AllureBuilder
Expand All @@ -40,6 +42,7 @@ type AllureLinksBuilder interface {
TmsLinks(tmsLinks ...string) AllureBuilder
}

// AllureLabelsBuilder ...
type AllureLabelsBuilder interface {
Feature(feature string) AllureBuilder
Epic(epic string) AllureBuilder
Expand Down Expand Up @@ -166,6 +169,7 @@ type RequestHTTPBuilder interface {
RequestParams
}

// RequestParams is a scope of methods for configurate http request
type RequestParams interface {
// RequestRepeat is a count of repeat request, if request was failed.
RequestRepeat(count int) RequestHTTPBuilder
Expand Down
4 changes: 4 additions & 0 deletions internal/utils/body.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"net/http"
)

// GetBody get body from IO
func GetBody(body io.ReadCloser) ([]byte, error) {
var (
err error
Expand All @@ -20,16 +21,19 @@ func GetBody(body io.ReadCloser) ([]byte, error) {
return buf.Bytes(), nil
}

// DrainBody ...
func DrainBody(body io.ReadCloser) (r1, r2 io.ReadCloser, err error) {
if body == nil || body == http.NoBody {
// No copying needed. Preserve the magic sentinel meaning of NoBody.
return http.NoBody, http.NoBody, nil
}

var buf bytes.Buffer

if _, err = buf.ReadFrom(body); err != nil {
return nil, body, err
}

if err = body.Close(); err != nil {
return nil, body, err
}
Expand Down
3 changes: 3 additions & 0 deletions internal/utils/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@ import (
// ToJSON returns string Json representation of any object that can be marshaled.
func ToJSON(v interface{}) (string, error) {
j, err := json.Marshal(v)

return string(j), err
}

// PrettyJSON make indent to json byte array. Returns prettified json as []byte or error if is it impossible
func PrettyJSON(b []byte) ([]byte, error) {
var out bytes.Buffer

err := json.Indent(&out, b, "", " ")

return out.Bytes(), err
}
1 change: 1 addition & 0 deletions jsonschema.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func (it *Test) validateJSONSchema(t internalT, body []byte) []error {

func checkJSONSchema(expect gojsonschema.JSONLoader, data []byte) []error {
scope := make([]error, 0)

validateResult, err := gojsonschema.Validate(expect, gojsonschema.NewBytesLoader(data))
if err != nil {
return []error{err}
Expand Down
1 change: 1 addition & 0 deletions provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"github.com/ozontech/allure-go/pkg/framework/provider"
)

// T is internal testing.T provider
type T interface {
tProvider
logProvider
Expand Down
1 change: 1 addition & 0 deletions request.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"net/url"
)

// RequestBuilder ...
type RequestBuilder func(o *requestOptions)

// File is struct for upload file in form field
Expand Down
Loading

0 comments on commit 97a43ec

Please sign in to comment.