Skip to content

Commit 5a6bfb7

Browse files
committed
Bump the github.com/onsi/ginkgo dependency to v2 (#998)
* go.*,vendor: Bump the github.com/onsi/ginkgo dependency to v2 Signed-off-by: timflannagan <[email protected]> * *: Migrate the repository to ginkgo v2 Signed-off-by: timflannagan <[email protected]>
1 parent 52e7432 commit 5a6bfb7

File tree

10 files changed

+32
-37
lines changed

10 files changed

+32
-37
lines changed

staging/operator-registry/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,7 @@ clean:
116116

117117
.PHONY: e2e
118118
e2e:
119-
$(GO) run github.com/onsi/ginkgo/ginkgo --v --randomizeAllSpecs --randomizeSuites --race $(if $(TEST),-focus '$(TEST)') $(TAGS) ./test/e2e -- $(if $(SKIPTLS),-skip-tls-verify true) $(if $(USEHTTP),-use-http true)
120-
119+
$(GO) run github.com/onsi/ginkgo/v2/ginkgo --v --randomize-all --progress --trace --randomize-suites --race $(if $(TEST),-focus '$(TEST)') $(TAGS) ./test/e2e -- $(if $(SKIPTLS),-skip-tls-verify true) $(if $(USEHTTP),-use-http true)
121120

122121
.PHONY: release
123122
export OPM_IMAGE_REPO ?= quay.io/operator-framework/opm

staging/operator-registry/docs/contributors/e2e_tests.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ running even after the test suite has completed.
2525
1. Run a specific BDD test using the `TEST` argument to make. Note that this argument uses regular expressions.
2626

2727
```bash
28-
DOCKER_REGISTRY_HOST=localhost:5000 GOENV='GOOS=linux' make build e2e TEST='builds and manipulates bundle and index images' USEHTTP="true" CLUSTER=kind
28+
DOCKER_REGISTRY_HOST=localhost:5000 GOENV='GOOS=linux' make build e2e TEST='builds and manipulates bundle and index images' USEHTTP="true" CLUSTER=kind
2929
```
3030

31-
1. If you want a quick way to ensure that your TEST regex argument will work, you can bypass the
32-
make file and use `-dryRun` with `-focus` and see if the regex would trigger your specific test(s).
31+
1. If you want a quick way to ensure that your TEST regex argument will work, you can bypass the
32+
make file and use `--dry-run` with `--focus` and see if the regex would trigger your specific test(s).
3333

3434
```bash
35-
GOFLAGS="-mod=vendor" go run github.com/onsi/ginkgo/ginkgo --v --randomizeAllSpecs --randomizeSuites --race -dryRun -focus 'builds and manipulates bundle and index images' -tags=json1,kind ./test/e2e
35+
GOFLAGS="-mod=vendor" go run github.com/onsi/ginkgo/v2/ginkgo --v --randomize-all --randomize-suites --race --dry-run --focus 'builds and manipulates bundle and index images' -tags=json1,kind ./test/e2e
3636
```
3737

3838
## Kind with SSL
@@ -55,16 +55,16 @@ make file and use `-dryRun` with `-focus` and see if the regex would trigger you
5555
DOCKER_REGISTRY_HOST=localhost:443 GOENV='GOOS=linux' make build e2e TEST='builds and manipulates bundle and index images' CLUSTER=kind
5656
```
5757

58-
1. If you want a quick way to ensure that your TEST regex argument will work, you can bypass the
59-
make file and use `-dryRun` with `-focus` and see if the regex would trigger your specific test(s).
58+
1. If you want a quick way to ensure that your TEST regex argument will work, you can bypass the
59+
make file and use `--dry-run` with `--focus` and see if the regex would trigger your specific test(s).
6060

6161
```bash
62-
GOFLAGS="-mod=vendor" go run github.com/onsi/ginkgo/ginkgo --v --randomizeAllSpecs --randomizeSuites --race -dryRun -focus 'builds and manipulates bundle and index images' -tags=json1,kind ./test/e2e
62+
GOFLAGS="-mod=vendor" go run github.com/onsi/ginkgo/v2/ginkgo --v --randomize-all --randomize-suites --race --dry-run --focus 'builds and manipulates bundle and index images' -tags=json1,kind ./test/e2e
6363
```
6464

6565
## Minikube (or other type) using kubeconfig without SSL
6666

67-
1. Install `minikube` (see https://minikube.sigs.k8s.io/docs/start/)
67+
1. Install [`minikube`](https://minikube.sigs.k8s.io/docs/start/)
6868

6969
1. Create a minikube cluster
7070

@@ -90,18 +90,18 @@ make file and use `-dryRun` with `-focus` and see if the regex would trigger you
9090
KUBECONFIG="$HOME/.kube/config" DOCKER_REGISTRY_HOST=localhost:5000 make build e2e TEST='builds and manipulates bundle and index images' SKIPTLS="true"
9191
```
9292

93-
1. If you want a quick way to ensure that your TEST regex argument will work, you can bypass the
94-
make file and use `-dryRun` with `-focus` and see if the regex would trigger your specific test(s).
93+
1. If you want a quick way to ensure that your TEST regex argument will work, you can bypass the
94+
make file and use `--dry-run` with `--focus` and see if the regex would trigger your specific test(s).
9595

9696
```bash
97-
GOFLAGS="-mod=vendor" go run github.com/onsi/ginkgo/ginkgo --v --randomizeAllSpecs --randomizeSuites --race -dryRun -focus 'builds and manipulates bundle and index images' -tags=json1 ./test/e2e
97+
GOFLAGS="-mod=vendor" go run github.com/onsi/ginkgo/v2/ginkgo --v --randomize-all --randomize-suites --race --dry-run --focus 'builds and manipulates bundle and index images' -tags=json1 ./test/e2e
9898
```
9999

100100
TIP: use a non-dynamic `kind` server by using `kind get kubeconfig --name "kind" > /tmp/kindconfig` and set `KUBECONFIG="/tmp/kindconfig"`
101101

102102
## Minikube (or other type) using kubeconfig with SSL
103103

104-
1. Install `minikube` (see https://minikube.sigs.k8s.io/docs/start/)
104+
1. Install [`minikube`](https://minikube.sigs.k8s.io/docs/start/)
105105

106106
1. Create a minikube cluster
107107

@@ -127,11 +127,11 @@ TIP: use a non-dynamic `kind` server by using `kind get kubeconfig --name "kind"
127127
KUBECONFIG="$HOME/.kube/config" DOCKER_REGISTRY_HOST=localhost:443 make build e2e TEST='builds and manipulates bundle and index images'
128128
```
129129

130-
1. If you want a quick way to ensure that your TEST regex argument will work, you can bypass the
131-
make file and use `-dryRun` with `-focus` and see if the regex would trigger your specific test(s).
130+
1. If you want a quick way to ensure that your TEST regex argument will work, you can bypass the
131+
make file and use `--dry-run` with `--focus` and see if the regex would trigger your specific test(s).
132132

133133
```bash
134-
GOFLAGS="-mod=vendor" go run github.com/onsi/ginkgo/ginkgo --v --randomizeAllSpecs --randomizeSuites --race -dryRun -focus 'builds and manipulates bundle and index images' -tags=json1 ./test/e2e
134+
GOFLAGS="-mod=vendor" go run github.com/onsi/ginkgo/v2/ginkgo --v --randomize-all --randomize-suites --race --dry-run --focus 'builds and manipulates bundle and index images' -tags=json1 ./test/e2e
135135
```
136136

137137
TIP: use a non-dynamic `kind` server by using `kind get kubeconfig --name "kind" > /tmp/kindconfig` and set `KUBECONFIG="/tmp/kindconfig"`
@@ -140,4 +140,4 @@ TIP: use a non-dynamic `kind` server by using `kind get kubeconfig --name "kind"
140140

141141
Currently the test case `Launch bundle` in test/e2e/bundle_image_test.go assumes that the `opm` executable used in the test is compiled for linux.
142142
If you run this test on a darwin environment, the kube job will not succeed unless you manually cross compile for linux and include
143-
the binary at `bin/opm`.
143+
the binary at `bin/opm`.

staging/operator-registry/go.mod

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ require (
2020
github.com/mattn/go-sqlite3 v1.14.10
2121
github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2
2222
github.com/mitchellh/hashstructure/v2 v2.0.2
23-
github.com/onsi/ginkgo v1.16.5
23+
github.com/onsi/ginkgo/v2 v2.1.3
2424
github.com/onsi/gomega v1.18.1
2525
github.com/opencontainers/go-digest v1.0.0
2626
github.com/opencontainers/image-spec v1.0.2
@@ -80,7 +80,6 @@ require (
8080
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
8181
github.com/evanphx/json-patch/v5 v5.2.0 // indirect
8282
github.com/felixge/httpsnoop v1.0.1 // indirect
83-
github.com/fsnotify/fsnotify v1.5.1 // indirect
8483
github.com/garyburd/redigo v1.6.0 // indirect
8584
github.com/go-git/gcfg v1.5.0 // indirect
8685
github.com/go-git/go-billy/v5 v5.1.0 // indirect
@@ -97,6 +96,7 @@ require (
9796
github.com/google/cel-go v0.10.1 // indirect
9897
github.com/google/gnostic v0.5.7-v3refs // indirect
9998
github.com/google/gofuzz v1.1.0 // indirect
99+
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 // indirect
100100
github.com/google/uuid v1.2.0 // indirect
101101
github.com/gorilla/handlers v1.4.2 // indirect
102102
github.com/gorilla/mux v1.8.0 // indirect
@@ -121,7 +121,6 @@ require (
121121
github.com/modern-go/reflect2 v1.0.2 // indirect
122122
github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c // indirect
123123
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
124-
github.com/nxadm/tail v1.4.8 // indirect
125124
github.com/pelletier/go-toml v1.9.3 // indirect
126125
github.com/pmezard/go-difflib v1.0.0 // indirect
127126
github.com/prometheus/client_golang v1.12.1 // indirect
@@ -159,7 +158,6 @@ require (
159158
google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac // indirect
160159
gopkg.in/inf.v0 v0.9.1 // indirect
161160
gopkg.in/square/go-jose.v2 v2.6.0 // indirect
162-
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
163161
gopkg.in/warnings.v0 v0.1.2 // indirect
164162
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
165163
k8s.io/apiserver v0.24.0 // indirect

staging/operator-registry/go.sum

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,6 @@ github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM
270270
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
271271
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
272272
github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI=
273-
github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU=
274273
github.com/fsouza/fake-gcs-server v1.7.0/go.mod h1:5XIRs4YvwNbNoz+1JF8j6KLAyDh7RHGAyAK3EP2EsNk=
275274
github.com/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0=
276275
github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY=
@@ -416,6 +415,7 @@ github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLe
416415
github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
417416
github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
418417
github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
418+
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 h1:yAJXTCF9TqKcTiHJAE8dj7HMvPfh66eeA2JYW7eFpSE=
419419
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
420420
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
421421
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ=
@@ -616,9 +616,9 @@ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108
616616
github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
617617
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
618618
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
619-
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
620-
github.com/onsi/ginkgo/v2 v2.0.0 h1:CcuG/HvWNkkaqCUpJifQY8z7qEMBJya6aLPx6ftGyjQ=
621619
github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
620+
github.com/onsi/ginkgo/v2 v2.1.3 h1:e/3Cwtogj0HA+25nMP1jCMDIf8RtRYbGwGGuBIFztkc=
621+
github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
622622
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
623623
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
624624
github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
@@ -1078,7 +1078,6 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc
10781078
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
10791079
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
10801080
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
1081-
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
10821081
golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
10831082
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
10841083
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=

staging/operator-registry/test/e2e/bundle_image_test.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ import (
1111
"strings"
1212
"time"
1313

14-
. "github.com/onsi/ginkgo"
15-
"github.com/onsi/ginkgo/extensions/table"
14+
. "github.com/onsi/ginkgo/v2"
1615
. "github.com/onsi/gomega"
1716

1817
"github.com/sirupsen/logrus"
@@ -88,7 +87,7 @@ var _ = Describe("Launch bundle", func() {
8887
initImage := dockerHost + "/olmtest/init-operator-manifest:test"
8988

9089
Context("Deploy bundle job", func() {
91-
table.DescribeTable("should populate specified configmap", func(bundleName, bundleDirectory string, gzip bool) {
90+
DescribeTable("should populate specified configmap", func(bundleName, bundleDirectory string, gzip bool) {
9291
// these permissions are only necessary for the e2e (and not OLM using the feature)
9392
By("configuring configmap service account")
9493
kubeclient, err := kubernetes.NewForConfig(ctx.Ctx().RESTConfig())
@@ -228,8 +227,8 @@ var _ = Describe("Launch bundle", func() {
228227
Expect(err).NotTo(HaveOccurred())
229228
},
230229

231-
table.Entry("Small bundle, uncompressed", "kiali.1.4.2", "testdata/bundles/kiali.1.4.2", false),
232-
table.Entry("Large bundle, compressed", "redis.0.4.0", "testdata/bundles/redis.0.4.0", true),
230+
Entry("Small bundle, uncompressed", "kiali.1.4.2", "testdata/bundles/kiali.1.4.2", false),
231+
Entry("Large bundle, compressed", "redis.0.4.0", "testdata/bundles/redis.0.4.0", true),
233232
)
234233
})
235234
})

staging/operator-registry/test/e2e/ctx/ctx.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"fmt"
55
"strings"
66

7-
. "github.com/onsi/ginkgo"
7+
. "github.com/onsi/ginkgo/v2"
88
operatorsv1 "github.com/operator-framework/api/pkg/operators/v1"
99
operatorsv1alpha1 "github.com/operator-framework/api/pkg/operators/v1alpha1"
1010
apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
@@ -39,7 +39,7 @@ func (ctx TestContext) Logf(f string, v ...interface{}) {
3939
if !strings.HasSuffix(f, "\n") {
4040
f += "\n"
4141
}
42-
fmt.Fprintf(GinkgoWriter, f, v...)
42+
_, _ = fmt.Fprintf(GinkgoWriter, f, v...)
4343
}
4444

4545
func (ctx TestContext) Scheme() *runtime.Scheme {

staging/operator-registry/test/e2e/e2e_suite_test.go

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

10-
. "github.com/onsi/ginkgo"
10+
. "github.com/onsi/ginkgo/v2"
1111
. "github.com/onsi/gomega"
1212
"github.com/spf13/cobra"
1313

staging/operator-registry/test/e2e/opm_bundle_test.go

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

10-
. "github.com/onsi/ginkgo"
10+
. "github.com/onsi/ginkgo/v2"
1111
. "github.com/onsi/gomega"
1212
"golang.org/x/mod/sumdb/dirhash"
1313

staging/operator-registry/test/e2e/opm_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"path/filepath"
1111
"reflect"
1212

13-
. "github.com/onsi/ginkgo"
13+
. "github.com/onsi/ginkgo/v2"
1414
. "github.com/onsi/gomega"
1515
"github.com/otiai10/copy"
1616
"github.com/sirupsen/logrus"

staging/operator-registry/tools.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ package tools
66
import (
77
_ "github.com/grpc-ecosystem/grpc-health-probe"
88
_ "github.com/maxbrunsfeld/counterfeiter/v6"
9-
_ "github.com/onsi/ginkgo/ginkgo"
9+
_ "github.com/onsi/ginkgo/v2/ginkgo"
1010
_ "google.golang.org/grpc/cmd/protoc-gen-go-grpc"
1111
_ "google.golang.org/protobuf/cmd/protoc-gen-go"
1212
)

0 commit comments

Comments
 (0)