Skip to content

Commit a4b59e8

Browse files
committed
Bump github.com/onsi/ginkgo to v2
Recent versions of "sigs.k8s.io/controller-runtime" have switched to "github.com/onsi/ginkgo/v2" and dropped the "sigs.k8s.io/controller-runtime/pkg/envtest/printer" package. This change to tests should make updating controller-runtime easier in the future.
1 parent 84e506d commit a4b59e8

File tree

4 files changed

+5
-11
lines changed

4 files changed

+5
-11
lines changed

go.mod

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ require (
77
github.com/go-logr/logr v1.2.2
88
github.com/google/go-cmp v0.5.7
99
github.com/google/uuid v1.3.0
10-
github.com/onsi/ginkgo v1.16.5
10+
github.com/onsi/ginkgo/v2 v2.0.0
1111
github.com/onsi/gomega v1.18.1
1212
github.com/pkg/errors v0.9.1
1313
github.com/sirupsen/logrus v1.8.1
@@ -59,7 +59,6 @@ require (
5959
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
6060
github.com/modern-go/reflect2 v1.0.2 // indirect
6161
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
62-
github.com/nxadm/tail v1.4.8 // indirect
6362
github.com/prometheus/client_golang v1.12.2 // indirect
6463
github.com/prometheus/client_model v0.2.0 // indirect
6564
github.com/prometheus/common v0.32.1 // indirect
@@ -81,7 +80,6 @@ require (
8180
google.golang.org/grpc v1.42.0 // indirect
8281
google.golang.org/protobuf v1.27.1 // indirect
8382
gopkg.in/inf.v0 v0.9.1 // indirect
84-
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
8583
gopkg.in/yaml.v2 v2.4.0 // indirect
8684
gopkg.in/yaml.v3 v3.0.1 // indirect
8785
k8s.io/apiextensions-apiserver v0.24.2 // indirect

go.sum

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,6 @@ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108
379379
github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
380380
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
381381
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
382-
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
383382
github.com/onsi/ginkgo/v2 v2.0.0 h1:CcuG/HvWNkkaqCUpJifQY8z7qEMBJya6aLPx6ftGyjQ=
384383
github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
385384
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=

internal/controller/postgrescluster/controller_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"strings"
2525
"testing"
2626

27-
. "github.com/onsi/ginkgo"
27+
. "github.com/onsi/ginkgo/v2"
2828
. "github.com/onsi/gomega"
2929
. "github.com/onsi/gomega/gstruct"
3030
"github.com/pkg/errors"

internal/controller/postgrescluster/suite_test.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
"path/filepath"
2424
"testing"
2525

26-
. "github.com/onsi/ginkgo"
26+
. "github.com/onsi/ginkgo/v2"
2727
. "github.com/onsi/gomega"
2828
"k8s.io/apimachinery/pkg/runtime"
2929
"k8s.io/apimachinery/pkg/util/version"
@@ -35,7 +35,6 @@ import (
3535
"k8s.io/client-go/rest"
3636
"sigs.k8s.io/controller-runtime/pkg/client"
3737
"sigs.k8s.io/controller-runtime/pkg/envtest"
38-
"sigs.k8s.io/controller-runtime/pkg/envtest/printer"
3938
"sigs.k8s.io/controller-runtime/pkg/log"
4039
"sigs.k8s.io/controller-runtime/pkg/manager"
4140

@@ -57,9 +56,7 @@ var suite struct {
5756
func TestAPIs(t *testing.T) {
5857
RegisterFailHandler(Fail)
5958

60-
RunSpecsWithDefaultAndCustomReporters(t,
61-
"Controller Suite",
62-
[]Reporter{printer.NewlineReporter{}})
59+
RunSpecs(t, "Controller Suite")
6360
}
6461

6562
var _ = BeforeSuite(func() {
@@ -90,7 +87,7 @@ var _ = BeforeSuite(func() {
9087

9188
suite.ServerVersion, err = version.ParseGeneric(server.GitVersion)
9289
Expect(err).ToNot(HaveOccurred())
93-
}, 60)
90+
})
9491

9592
var _ = AfterSuite(func() {
9693
By("tearing down the test environment")

0 commit comments

Comments
 (0)