Skip to content

Commit 6470a8f

Browse files
authored
migrate to ginkgo/v2 (#156)
Signed-off-by: Joe Lanford <[email protected]>
1 parent 10768b4 commit 6470a8f

33 files changed

+191
-57
lines changed

go.mod

Lines changed: 151 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
module github.com/operator-framework/helm-operator-plugins
22

3-
go 1.16
3+
go 1.17
44

55
require (
66
github.com/blang/semver/v4 v4.0.0
77
github.com/go-logr/logr v1.2.0
88
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0
99
github.com/iancoleman/strcase v0.1.2
1010
github.com/kr/text v0.2.0
11-
github.com/onsi/ginkgo v1.16.5
11+
github.com/onsi/ginkgo/v2 v2.1.3
1212
github.com/onsi/gomega v1.17.0
1313
github.com/operator-framework/operator-lib v0.3.0
1414
github.com/prometheus/client_golang v1.11.0
@@ -30,6 +30,155 @@ require (
3030
sigs.k8s.io/yaml v1.3.0
3131
)
3232

33+
require (
34+
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
35+
github.com/BurntSushi/toml v0.3.1 // indirect
36+
github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd // indirect
37+
github.com/Masterminds/goutils v1.1.1 // indirect
38+
github.com/Masterminds/semver/v3 v3.1.1 // indirect
39+
github.com/Masterminds/sprig/v3 v3.2.2 // indirect
40+
github.com/Masterminds/squirrel v1.5.0 // indirect
41+
github.com/Microsoft/go-winio v0.4.16 // indirect
42+
github.com/Microsoft/hcsshim v0.8.14 // indirect
43+
github.com/PuerkitoBio/purell v1.1.1 // indirect
44+
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
45+
github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d // indirect
46+
github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 // indirect
47+
github.com/beorn7/perks v1.0.1 // indirect
48+
github.com/bshuster-repo/logrus-logstash-hook v0.4.1 // indirect
49+
github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd // indirect
50+
github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b // indirect
51+
github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0 // indirect
52+
github.com/cespare/xxhash/v2 v2.1.1 // indirect
53+
github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5 // indirect
54+
github.com/cloudflare/cfssl v1.5.0 // indirect
55+
github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59 // indirect
56+
github.com/containerd/containerd v1.4.4 // indirect
57+
github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7 // indirect
58+
github.com/cyphar/filepath-securejoin v0.2.2 // indirect
59+
github.com/davecgh/go-spew v1.1.1 // indirect
60+
github.com/deislabs/oras v0.11.1 // indirect
61+
github.com/docker/cli v20.10.5+incompatible // indirect
62+
github.com/docker/distribution v2.7.1+incompatible // indirect
63+
github.com/docker/docker v17.12.0-ce-rc1.0.20200618181300-9dc6525e6118+incompatible // indirect
64+
github.com/docker/docker-credential-helpers v0.6.3 // indirect
65+
github.com/docker/go-connections v0.4.0 // indirect
66+
github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916 // indirect
67+
github.com/docker/go-units v0.4.0 // indirect
68+
github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1 // indirect
69+
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
70+
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect
71+
github.com/fatih/color v1.12.0 // indirect
72+
github.com/fsnotify/fsnotify v1.5.1 // indirect
73+
github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7 // indirect
74+
github.com/go-errors/errors v1.0.1 // indirect
75+
github.com/go-logr/zapr v1.2.0 // indirect
76+
github.com/go-openapi/jsonpointer v0.19.5 // indirect
77+
github.com/go-openapi/jsonreference v0.19.5 // indirect
78+
github.com/go-openapi/swag v0.19.14 // indirect
79+
github.com/gobuffalo/flect v0.2.3 // indirect
80+
github.com/gobwas/glob v0.2.3 // indirect
81+
github.com/gogo/protobuf v1.3.2 // indirect
82+
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
83+
github.com/golang/protobuf v1.5.2 // indirect
84+
github.com/google/btree v1.0.1 // indirect
85+
github.com/google/certificate-transparency-go v1.0.21 // indirect
86+
github.com/google/go-cmp v0.5.6 // indirect
87+
github.com/google/gofuzz v1.1.0 // indirect
88+
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
89+
github.com/google/uuid v1.1.2 // indirect
90+
github.com/googleapis/gnostic v0.5.5 // indirect
91+
github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33 // indirect
92+
github.com/gorilla/mux v1.8.0 // indirect
93+
github.com/gosuri/uitable v0.0.4 // indirect
94+
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect
95+
github.com/huandu/xstrings v1.3.1 // indirect
96+
github.com/imdario/mergo v0.3.12 // indirect
97+
github.com/inconshreveable/mousetrap v1.0.0 // indirect
98+
github.com/jmoiron/sqlx v1.3.1 // indirect
99+
github.com/josharian/intern v1.0.0 // indirect
100+
github.com/json-iterator/go v1.1.12 // indirect
101+
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
102+
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
103+
github.com/lib/pq v1.10.0 // indirect
104+
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
105+
github.com/mailru/easyjson v0.7.6 // indirect
106+
github.com/mattn/go-colorable v0.1.8 // indirect
107+
github.com/mattn/go-isatty v0.0.12 // indirect
108+
github.com/mattn/go-runewidth v0.0.7 // indirect
109+
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
110+
github.com/mitchellh/copystructure v1.1.1 // indirect
111+
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
112+
github.com/mitchellh/reflectwalk v1.0.1 // indirect
113+
github.com/moby/spdystream v0.2.0 // indirect
114+
github.com/moby/term v0.0.0-20210610120745-9d4ed1856297 // indirect
115+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
116+
github.com/modern-go/reflect2 v1.0.2 // indirect
117+
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
118+
github.com/morikuni/aec v1.0.0 // indirect
119+
github.com/nxadm/tail v1.4.8 // indirect
120+
github.com/onsi/ginkgo v1.16.5 // indirect
121+
github.com/opencontainers/go-digest v1.0.0 // indirect
122+
github.com/opencontainers/image-spec v1.0.1 // indirect
123+
github.com/opencontainers/runc v0.1.1 // indirect
124+
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
125+
github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2 // indirect
126+
github.com/pkg/errors v0.9.1 // indirect
127+
github.com/pmezard/go-difflib v1.0.0 // indirect
128+
github.com/prometheus/client_model v0.2.0 // indirect
129+
github.com/prometheus/common v0.28.0 // indirect
130+
github.com/prometheus/procfs v0.6.0 // indirect
131+
github.com/rubenv/sql-migrate v0.0.0-20200616145509-8d140a17f351 // indirect
132+
github.com/russross/blackfriday v1.5.2 // indirect
133+
github.com/shopspring/decimal v1.2.0 // indirect
134+
github.com/spf13/cast v1.3.1 // indirect
135+
github.com/weppos/publicsuffix-go v0.13.0 // indirect
136+
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
137+
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
138+
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
139+
github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca // indirect
140+
github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43 // indirect
141+
github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50 // indirect
142+
github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f // indirect
143+
github.com/zmap/zcrypto v0.0.0-20200911161511-43ff0ea04f21 // indirect
144+
github.com/zmap/zlint/v2 v2.2.1 // indirect
145+
go.opencensus.io v0.23.0 // indirect
146+
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect
147+
go.uber.org/atomic v1.7.0 // indirect
148+
go.uber.org/multierr v1.6.0 // indirect
149+
go.uber.org/zap v1.19.1 // indirect
150+
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect
151+
golang.org/x/mod v0.4.2 // indirect
152+
golang.org/x/net v0.0.0-20211209124913-491a49abca63 // indirect
153+
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect
154+
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
155+
golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8 // indirect
156+
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect
157+
golang.org/x/text v0.3.7 // indirect
158+
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
159+
golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff // indirect
160+
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
161+
google.golang.org/appengine v1.6.7 // indirect
162+
google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2 // indirect
163+
google.golang.org/grpc v1.40.0 // indirect
164+
google.golang.org/protobuf v1.27.1 // indirect
165+
gopkg.in/gorp.v1 v1.7.2 // indirect
166+
gopkg.in/inf.v0 v0.9.1 // indirect
167+
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
168+
gopkg.in/yaml.v2 v2.4.0 // indirect
169+
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
170+
k8s.io/apiserver v0.23.1 // indirect
171+
k8s.io/component-base v0.23.1 // indirect
172+
k8s.io/klog/v2 v2.30.0 // indirect
173+
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect
174+
k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b // indirect
175+
sigs.k8s.io/controller-tools v0.7.0 // indirect
176+
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
177+
sigs.k8s.io/kustomize/api v0.10.1 // indirect
178+
sigs.k8s.io/kustomize/kyaml v0.13.0 // indirect
179+
sigs.k8s.io/structured-merge-diff/v4 v4.2.0 // indirect
180+
)
181+
33182
replace (
34183
github.com/Azure/go-autorest => github.com/Azure/go-autorest v13.3.2+incompatible
35184
github.com/docker/distribution => github.com/docker/distribution v0.0.0-20191216044856-a8371794149d

go.sum

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,7 @@ github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLe
501501
github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
502502
github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
503503
github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
504+
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
504505
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
505506
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4=
506507
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ=
@@ -757,6 +758,8 @@ github.com/onsi/ginkgo v1.14.1/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9k
757758
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
758759
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
759760
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
761+
github.com/onsi/ginkgo/v2 v2.1.3 h1:e/3Cwtogj0HA+25nMP1jCMDIf8RtRYbGwGGuBIFztkc=
762+
github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
760763
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
761764
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
762765
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=

hack/generate/samples/generate_testdata.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ import (
1919
"os"
2020
"path/filepath"
2121

22-
"github.com/operator-framework/helm-operator-plugins/hack/generate/samples/internal/hybrid"
2322
log "github.com/sirupsen/logrus"
23+
24+
"github.com/operator-framework/helm-operator-plugins/hack/generate/samples/internal/hybrid"
2425
)
2526

2627
func main() {

internal/flags/flag_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
package flags_test
1616

1717
import (
18-
. "github.com/onsi/ginkgo"
18+
. "github.com/onsi/ginkgo/v2"
1919
. "github.com/onsi/gomega"
2020
"github.com/spf13/pflag"
2121
"sigs.k8s.io/controller-runtime/pkg/manager"

internal/flags/suite_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ package flags_test
1717
import (
1818
"testing"
1919

20-
. "github.com/onsi/ginkgo"
20+
. "github.com/onsi/ginkgo/v2"
2121
. "github.com/onsi/gomega"
2222
)
2323

internal/sdk/controllerutil/controllerutil_suite_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package controllerutil_test
1919
import (
2020
"testing"
2121

22-
. "github.com/onsi/ginkgo"
22+
. "github.com/onsi/ginkgo/v2"
2323
. "github.com/onsi/gomega"
2424
)
2525

internal/sdk/controllerutil/controllerutil_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package controllerutil_test
1919
import (
2020
"context"
2121

22-
. "github.com/onsi/ginkgo"
22+
. "github.com/onsi/ginkgo/v2"
2323
. "github.com/onsi/gomega"
2424
v1 "k8s.io/api/core/v1"
2525
"k8s.io/apimachinery/pkg/api/meta"

internal/testutils/utils.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import (
2525
"regexp"
2626
"strings"
2727

28-
. "github.com/onsi/ginkgo"
2928
kbtestutils "sigs.k8s.io/kubebuilder/v3/test/e2e/utils"
3029
)
3130

@@ -187,15 +186,3 @@ func UncommentCode(filename, target, prefix string) error {
187186
// nolint:gosec
188187
return ioutil.WriteFile(filename, out.Bytes(), 0644)
189188
}
190-
191-
// WrapWarnOutput is a one-liner to wrap an error from a command that returns (string, error) in a warning.
192-
func WrapWarnOutput(_ string, err error) {
193-
if err != nil {
194-
fmt.Fprintf(GinkgoWriter, "warning: %s", err)
195-
}
196-
}
197-
198-
// WrapWarn is a one-liner to wrap an error from a command that returns (error) in a warning.
199-
func WrapWarn(err error) {
200-
WrapWarnOutput("", err)
201-
}

pkg/annotation/annotation_suite_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package annotation_test
1919
import (
2020
"testing"
2121

22-
. "github.com/onsi/ginkgo"
22+
. "github.com/onsi/ginkgo/v2"
2323
. "github.com/onsi/gomega"
2424
)
2525

pkg/annotation/annotation_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ limitations under the License.
1717
package annotation
1818

1919
import (
20-
. "github.com/onsi/ginkgo"
20+
. "github.com/onsi/ginkgo/v2"
2121
. "github.com/onsi/gomega"
2222
"helm.sh/helm/v3/pkg/action"
2323
)

0 commit comments

Comments
 (0)