Skip to content

Commit 6048250

Browse files
perdasilvaPer Goncalves da Silva
andauthored
Update ginkgo to v2 (#2732)
Signed-off-by: Per Goncalves da Silva <[email protected]> Co-authored-by: Per Goncalves da Silva <[email protected]>
1 parent 73a2b07 commit 6048250

File tree

260 files changed

+17017
-12071
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

260 files changed

+17017
-12071
lines changed

.github/workflows/e2e-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
- uses: actions/setup-go@v2
2020
with:
2121
go-version: '~1.17'
22+
- run: mkdir -p artifacts
2223
- run: make e2e-local E2E_TEST_CHUNK=${{ matrix.parallel-id }} E2E_TEST_NUM_CHUNKS=${{ strategy.job-total }} E2E_NODES=2 ARTIFACT_DIR=./artifacts/ SKIP='\[FLAKE\]'
2324
- name: Archive Test Artifacts # test results, failed or not, are always uploaded.
2425
if: ${{ always() }}

.github/workflows/flaky-e2e.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
- uses: actions/setup-go@v2
1616
with:
1717
go-version: '~1.17'
18+
- run: mkdir -p artifacts
1819
- run: make e2e-local E2E_NODES=1 TEST='\[FLAKE\]' ARTIFACT_DIR=./artifacts/
1920
- name: Archive Test Artifacts # test results, failed or not, are always uploaded.
2021
if: ${{ always() }}

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ YQ_INTERNAL := go run $(MOD_FLAGS) ./vendor/github.com/mikefarah/yq/v3/
2626
KUBEBUILDER_ASSETS := $(or $(or $(KUBEBUILDER_ASSETS),$(dir $(shell command -v kubebuilder))),/usr/local/kubebuilder/bin)
2727
export KUBEBUILDER_ASSETS
2828
GO := GO111MODULE=on GOFLAGS="$(MOD_FLAGS)" go
29-
GINKGO := $(GO) run github.com/onsi/ginkgo/ginkgo
29+
GINKGO := $(GO) run github.com/onsi/ginkgo/v2/ginkgo
3030
BINDATA := $(GO) run github.com/go-bindata/go-bindata/v3/go-bindata
3131
GIT_COMMIT := $(shell git rev-parse HEAD)
3232

@@ -132,7 +132,7 @@ E2E_TEST_NUM_CHUNKS ?= 4
132132
ifneq (all,$(E2E_TEST_CHUNK))
133133
TEST := $(shell go run ./test/e2e/split/... -chunks $(E2E_TEST_NUM_CHUNKS) -print-chunk $(E2E_TEST_CHUNK) ./test/e2e)
134134
endif
135-
E2E_OPTS ?= $(if $(E2E_SEED),-seed '$(E2E_SEED)') $(if $(SKIP), -skip '$(SKIP)') $(if $(TEST),-focus '$(TEST)') -flakeAttempts $(E2E_FLAKE_ATTEMPTS) -nodes $(E2E_NODES) -timeout $(E2E_TIMEOUT) -v -randomizeSuites -race -trace -progress
135+
E2E_OPTS ?= $(if $(E2E_SEED),-seed '$(E2E_SEED)') $(if $(SKIP), -skip '$(SKIP)') $(if $(TEST),-focus '$(TEST)') $(if $(ARTIFACT_DIR), -junit-report '$(ARTIFACT_DIR)junit_e2e.xml') -flake-attempts $(E2E_FLAKE_ATTEMPTS) -nodes $(E2E_NODES) -timeout $(E2E_TIMEOUT) -v -randomize-suites -race -trace -progress
136136
E2E_INSTALL_NS ?= operator-lifecycle-manager
137137
E2E_TEST_NS ?= operators
138138

go.mod

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ require (
2020
github.com/mikefarah/yq/v3 v3.0.0-20201202084205-8846255d1c37
2121
github.com/mitchellh/hashstructure v1.0.0
2222
github.com/mitchellh/mapstructure v1.4.1
23-
github.com/onsi/ginkgo v1.16.5
23+
github.com/onsi/ginkgo/v2 v2.1.3
2424
github.com/onsi/gomega v1.17.0
2525
github.com/openshift/api v0.0.0-20200331152225-585af27e34fd
2626
github.com/openshift/client-go v0.0.0-20200326155132-2a6cd50aedd0
@@ -35,7 +35,7 @@ require (
3535
github.com/spf13/cobra v1.2.1
3636
github.com/spf13/pflag v1.0.5
3737
github.com/stretchr/testify v1.7.0
38-
golang.org/x/net v0.0.0-20211209124913-491a49abca63
38+
golang.org/x/net v0.0.0-20220225172249-27dd8689420f
3939
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac
4040
google.golang.org/grpc v1.40.0
4141
gopkg.in/yaml.v2 v2.4.0
@@ -124,6 +124,7 @@ require (
124124
github.com/google/btree v1.0.1 // indirect
125125
github.com/google/cel-go v0.9.0 // indirect
126126
github.com/google/gofuzz v1.1.0 // indirect
127+
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 // indirect
127128
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
128129
github.com/google/uuid v1.1.2 // indirect
129130
github.com/gorilla/mux v1.8.0 // indirect
@@ -163,7 +164,6 @@ require (
163164
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
164165
github.com/morikuni/aec v1.0.0 // indirect
165166
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
166-
github.com/nxadm/tail v1.4.8 // indirect
167167
github.com/opencontainers/go-digest v1.0.0 // indirect
168168
github.com/opencontainers/image-spec v1.0.2-0.20190823105129-775207bd45b6 // indirect
169169
github.com/opencontainers/runc v0.1.1 // indirect
@@ -209,7 +209,7 @@ require (
209209
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect
210210
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
211211
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 // indirect
212-
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect
212+
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
213213
golang.org/x/text v0.3.7 // indirect
214214
golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff // indirect
215215
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
@@ -221,7 +221,6 @@ require (
221221
gopkg.in/inf.v0 v0.9.1 // indirect
222222
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
223223
gopkg.in/op/go-logging.v1 v1.0.0-20160211212156-b2cb9fa56473 // indirect
224-
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
225224
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
226225
k8s.io/cli-runtime v0.23.1 // indirect
227226
k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c // indirect

go.sum

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,8 @@ github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLe
592592
github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
593593
github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
594594
github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
595+
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 h1:yAJXTCF9TqKcTiHJAE8dj7HMvPfh66eeA2JYW7eFpSE=
596+
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
595597
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
596598
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4=
597599
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ=
@@ -892,6 +894,8 @@ github.com/onsi/ginkgo v1.14.1/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9k
892894
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
893895
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
894896
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
897+
github.com/onsi/ginkgo/v2 v2.1.3 h1:e/3Cwtogj0HA+25nMP1jCMDIf8RtRYbGwGGuBIFztkc=
898+
github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
895899
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
896900
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
897901
github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
@@ -1364,8 +1368,9 @@ golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qx
13641368
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
13651369
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
13661370
golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
1367-
golang.org/x/net v0.0.0-20211209124913-491a49abca63 h1:iocB37TsdFuN6IBRZ+ry36wrkoV51/tl5vOWqkcPGvY=
13681371
golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
1372+
golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc=
1373+
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
13691374
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
13701375
golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
13711376
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -1489,13 +1494,15 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc
14891494
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
14901495
golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
14911496
golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
1497+
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
14921498
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 h1:XfKQ4OlFl8okEOr5UvAqFRVj8pY/4yfcXrddB8qAbU0=
14931499
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
14941500
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
14951501
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
14961502
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
1497-
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE=
14981503
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
1504+
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
1505+
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
14991506
golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
15001507
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
15011508
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=

pkg/controller/operators/adoption_controller_test.go

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

7-
. "github.com/onsi/ginkgo"
7+
. "github.com/onsi/ginkgo/v2"
88
. "github.com/onsi/gomega"
99
appsv1 "k8s.io/api/apps/v1"
1010
corev1 "k8s.io/api/core/v1"

pkg/controller/operators/openshift/clusteroperator_controller_test.go

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

66
semver "github.com/blang/semver/v4"
7-
. "github.com/onsi/ginkgo"
7+
. "github.com/onsi/ginkgo/v2"
88
. "github.com/onsi/gomega"
99
configv1 "github.com/openshift/api/config/v1"
1010
corev1 "k8s.io/api/core/v1"

pkg/controller/operators/openshift/suite_test.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"testing"
77
"time"
88

9-
. "github.com/onsi/ginkgo"
9+
. "github.com/onsi/ginkgo/v2"
1010
. "github.com/onsi/gomega"
1111
configv1 "github.com/openshift/api/config/v1"
1212
"github.com/operator-framework/api/crds"
@@ -15,19 +15,14 @@ import (
1515
ctrl "sigs.k8s.io/controller-runtime"
1616
"sigs.k8s.io/controller-runtime/pkg/client"
1717
"sigs.k8s.io/controller-runtime/pkg/envtest"
18-
"sigs.k8s.io/controller-runtime/pkg/envtest/printer"
1918
logf "sigs.k8s.io/controller-runtime/pkg/log"
2019
"sigs.k8s.io/controller-runtime/pkg/log/zap"
2120
)
2221

2322
func TestControllers(t *testing.T) {
2423
RegisterFailHandler(Fail)
2524

26-
RunSpecsWithDefaultAndCustomReporters(
27-
t,
28-
"OpenShift Suite",
29-
[]Reporter{printer.NewlineReporter{}},
30-
)
25+
RunSpecs(t, "OpenShift Suite")
3126
}
3227

3328
var (

pkg/controller/operators/operator_controller_test.go

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

6-
. "github.com/onsi/ginkgo"
6+
. "github.com/onsi/ginkgo/v2"
77
. "github.com/onsi/gomega"
88
corev1 "k8s.io/api/core/v1"
99
rbacv1 "k8s.io/api/rbac/v1"

pkg/controller/operators/operatorcondition_controller_test.go

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

7-
. "github.com/onsi/ginkgo"
7+
. "github.com/onsi/ginkgo/v2"
88
. "github.com/onsi/gomega"
99
operatorsv1alpha1 "github.com/operator-framework/api/pkg/operators/v1alpha1"
1010
operatorsv2 "github.com/operator-framework/api/pkg/operators/v2"

0 commit comments

Comments
 (0)