Skip to content

Commit ad5d74d

Browse files
authored
Update to ginkgo v2 (#753)
1 parent 72f1145 commit ad5d74d

26 files changed

+32
-28
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@ GOBIN ?= $(GOPATH)/bin
1212
GOLINT ?= $(GOBIN)/golint
1313
GOSEC ?= $(GOBIN)/gosec
1414
GINKGO ?= $(GOBIN)/ginkgo
15-
GO_VERSION = 1.15
15+
GO_VERSION = 1.17
1616

1717
default:
1818
$(MAKE) build
1919

2020
install-test-deps:
21-
$(GO_NOMOD) get -u github.com/onsi/ginkgo/ginkgo
21+
go install github.com/onsi/ginkgo/v2/ginkgo@latest
2222
$(GO_NOMOD) get -u golang.org/x/crypto/ssh
2323
$(GO_NOMOD) get -u github.com/lib/pq
2424

2525
test: install-test-deps build fmt lint sec
26-
$(GINKGO) -r -v
26+
$(GINKGO) -v --fail-fast
2727

2828
fmt:
2929
@echo "FORMATTING"

analyzer_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"os"
88
"strings"
99

10-
. "github.com/onsi/ginkgo"
10+
. "github.com/onsi/ginkgo/v2"
1111
. "github.com/onsi/gomega"
1212
"github.com/securego/gosec/v2"
1313
"github.com/securego/gosec/v2/rules"

call_list_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package gosec_test
33
import (
44
"go/ast"
55

6-
. "github.com/onsi/ginkgo"
6+
. "github.com/onsi/ginkgo/v2"
77
. "github.com/onsi/gomega"
88
"github.com/securego/gosec/v2"
99
"github.com/securego/gosec/v2/testutils"

cmd/gosec/sort_issues_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package main
33
import (
44
"testing"
55

6-
. "github.com/onsi/ginkgo"
6+
. "github.com/onsi/ginkgo/v2"
77
. "github.com/onsi/gomega"
88
"github.com/securego/gosec/v2"
99
)

cmd/tlsconfig/tls_version_go12_go13.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build go1.12 && !go1.14
12
// +build go1.12,!go1.14
23

34
// This file can be removed once go1.13 is no longer supported

config_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"bytes"
55
"strings"
66

7-
. "github.com/onsi/ginkgo"
7+
. "github.com/onsi/ginkgo/v2"
88
. "github.com/onsi/gomega"
99
"github.com/securego/gosec/v2"
1010
)

cwe/cwe_suite_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package cwe_test
33
import (
44
"testing"
55

6-
. "github.com/onsi/ginkgo"
6+
. "github.com/onsi/ginkgo/v2"
77
. "github.com/onsi/gomega"
88
)
99

cwe/data_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package cwe_test
22

33
import (
4-
. "github.com/onsi/ginkgo"
4+
. "github.com/onsi/ginkgo/v2"
55
. "github.com/onsi/gomega"
66
"github.com/securego/gosec/v2/cwe"
77
)

cwe/types_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package cwe_test
22

33
import (
4-
. "github.com/onsi/ginkgo"
4+
. "github.com/onsi/ginkgo/v2"
55
. "github.com/onsi/gomega"
66
"github.com/securego/gosec/v2/cwe"
77
)

flag_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"flag"
55
"os"
66

7-
. "github.com/onsi/ginkgo"
7+
. "github.com/onsi/ginkgo/v2"
88
. "github.com/onsi/gomega"
99
"github.com/securego/gosec/v2/cmd/vflag"
1010
)

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require (
66
github.com/lib/pq v1.10.4
77
github.com/mozilla/tls-observatory v0.0.0-20210609171429-7bc42856d2e5
88
github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354
9-
github.com/onsi/ginkgo v1.16.5
9+
github.com/onsi/ginkgo/v2 v2.0.0
1010
github.com/onsi/gomega v1.17.0
1111
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3
1212
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616

go.sum

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hf
157157
github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
158158
github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
159159
github.com/google/pprof v0.0.0-20200507031123-427632fa3b1c/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
160+
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
160161
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
161162
github.com/google/trillian v1.3.11/go.mod h1:0tPraVHrSDkA3BO6vKX67zgLXs6SsOAbHEivX+9mPgw=
162163
github.com/google/uuid v0.0.0-20161128191214-064e2069ce9c/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
@@ -187,6 +188,7 @@ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpO
187188
github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo=
188189
github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4=
189190
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
191+
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
190192
github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
191193
github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
192194
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
@@ -264,9 +266,10 @@ github.com/olekukonko/tablewriter v0.0.2/go.mod h1:rSAaSIOAGT9odnlyGlUfAJaoc5w2f
264266
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
265267
github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
266268
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
269+
github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc=
267270
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
268-
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
269-
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
271+
github.com/onsi/ginkgo/v2 v2.0.0 h1:CcuG/HvWNkkaqCUpJifQY8z7qEMBJya6aLPx6ftGyjQ=
272+
github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
270273
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
271274
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
272275
github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE=

gosec_suite_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package gosec_test
33
import (
44
"testing"
55

6-
. "github.com/onsi/ginkgo"
6+
. "github.com/onsi/ginkgo/v2"
77
. "github.com/onsi/gomega"
88
)
99

helpers_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"path/filepath"
88
"regexp"
99

10-
. "github.com/onsi/ginkgo"
10+
. "github.com/onsi/ginkgo/v2"
1111
. "github.com/onsi/gomega"
1212
"github.com/securego/gosec/v2"
1313
"github.com/securego/gosec/v2/testutils"

import_tracker_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package gosec_test
22

33
import (
4-
. "github.com/onsi/ginkgo"
4+
. "github.com/onsi/ginkgo/v2"
55
. "github.com/onsi/gomega"
66
"github.com/securego/gosec/v2"
77
"github.com/securego/gosec/v2/testutils"

issue_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package gosec_test
33
import (
44
"go/ast"
55

6-
. "github.com/onsi/ginkgo"
6+
. "github.com/onsi/ginkgo/v2"
77
. "github.com/onsi/gomega"
88
"github.com/securego/gosec/v2"
99
"github.com/securego/gosec/v2/rules"

report/formatter_suite_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package report
33
import (
44
"testing"
55

6-
. "github.com/onsi/ginkgo"
6+
. "github.com/onsi/ginkgo/v2"
77
. "github.com/onsi/gomega"
88
)
99

report/formatter_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"fmt"
77
"strings"
88

9-
. "github.com/onsi/ginkgo"
9+
. "github.com/onsi/ginkgo/v2"
1010
. "github.com/onsi/gomega"
1111
"github.com/securego/gosec/v2"
1212
"github.com/securego/gosec/v2/cwe"

report/sarif/sarif_suite_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package sarif_test
33
import (
44
"testing"
55

6-
. "github.com/onsi/ginkgo"
6+
. "github.com/onsi/ginkgo/v2"
77
. "github.com/onsi/gomega"
88
)
99

report/sarif/sarif_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"bytes"
55
"regexp"
66

7-
. "github.com/onsi/ginkgo"
7+
. "github.com/onsi/ginkgo/v2"
88
. "github.com/onsi/gomega"
99
"github.com/securego/gosec/v2"
1010
"github.com/securego/gosec/v2/report/sarif"

report/sonar/sonar_suite_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package sonar_test
33
import (
44
"testing"
55

6-
. "github.com/onsi/ginkgo"
6+
. "github.com/onsi/ginkgo/v2"
77
. "github.com/onsi/gomega"
88
)
99

report/sonar/sonar_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package sonar_test
22

33
import (
4-
. "github.com/onsi/ginkgo"
4+
. "github.com/onsi/ginkgo/v2"
55
. "github.com/onsi/gomega"
66
"github.com/securego/gosec/v2"
77
"github.com/securego/gosec/v2/report/sonar"

resolve_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package gosec_test
33
import (
44
"go/ast"
55

6-
. "github.com/onsi/ginkgo"
6+
. "github.com/onsi/ginkgo/v2"
77
. "github.com/onsi/gomega"
88
"github.com/securego/gosec/v2"
99
"github.com/securego/gosec/v2/testutils"

rule_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"fmt"
55
"go/ast"
66

7-
. "github.com/onsi/ginkgo"
7+
. "github.com/onsi/ginkgo/v2"
88
. "github.com/onsi/gomega"
99
"github.com/securego/gosec/v2"
1010
)

rules/rules_suite_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package rules_test
33
import (
44
"testing"
55

6-
. "github.com/onsi/ginkgo"
6+
. "github.com/onsi/ginkgo/v2"
77
. "github.com/onsi/gomega"
88
)
99

rules/rules_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"fmt"
55
"log"
66

7-
. "github.com/onsi/ginkgo"
7+
. "github.com/onsi/ginkgo/v2"
88
. "github.com/onsi/gomega"
99
"github.com/securego/gosec/v2"
1010
"github.com/securego/gosec/v2/rules"

0 commit comments

Comments
 (0)