Skip to content

Commit

Permalink
fix test (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
owenrumney authored Dec 10, 2021
1 parent b22382f commit 9ac150c
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 19 deletions.
1 change: 0 additions & 1 deletion example/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ go 1.17

replace github.com/owenrumney/go-sarif/v2 => ../v2

require github.com/owenrumney/go-sarif/v2 v2.0.0
2 changes: 1 addition & 1 deletion example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func main() {
}

// create a run for tfsec
run := sarif.NewRun("tfsec", "https://tfsec.dev")
run := sarif.NewRunWithInformationURI("tfsec", "https://tfsec.dev")

// for each result, add the
for _, r := range tfsecResults.Results {
Expand Down
7 changes: 1 addition & 6 deletions v2/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,4 @@ module github.com/owenrumney/go-sarif/v2

go 1.16

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/kr/pretty v0.1.0 // indirect
github.com/stretchr/testify v1.7.0
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
)
require github.com/stretchr/testify v1.7.0
11 changes: 2 additions & 9 deletions v2/go.sum
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
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/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
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/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
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/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
2 changes: 1 addition & 1 deletion v2/test/run_stage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func newRunTest(t *testing.T) (*runTest, *runTest, *runTest) {
}

func (r *runTest) a_result_is_added() {
r.run.AddResult("rule1")
r.run.CreateResultForRule("rule1")
}

func (r *runTest) properties_added_to_a_run() {
Expand Down
2 changes: 1 addition & 1 deletion v2/test/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func Test_new_result_on_run(t *testing.T) {
func Test_properties_on_a_run(t *testing.T) {
given, when, then := newRunTest(t)

expected := `{"tool":{"driver":null},"results":[],"properties":{"boolean_key":false,"string_key":"string_value"}}`
expected := `{"properties":{"boolean_key":false,"string_key":"string_value"},"results":[],"tool":{"driver":null}}`

given.properties_added_to_a_run()
when.the_run_is_json()
Expand Down

0 comments on commit 9ac150c

Please sign in to comment.