Skip to content

Commit

Permalink
Adpat custom reporter chnages
Browse files Browse the repository at this point in the history
  • Loading branch information
acumino committed Mar 3, 2022
1 parent af8151f commit beb43d9
Show file tree
Hide file tree
Showing 41 changed files with 44 additions and 255 deletions.
4 changes: 1 addition & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -354,15 +354,13 @@ github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9k
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
github.com/onsi/ginkgo/v2 v2.1.1 h1:LCnPB85AvFNr91s0B2aDzEiiIg6MUwLYbryC1NSlWi8=
github.com/onsi/ginkgo/v2 v2.1.1/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE=
github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
github.com/onsi/gomega v1.18.0 h1:ngbYoRctxjl8SiF7XgP0NxBFbfHcg3wfHMMaFHWwMTM=
github.com/onsi/gomega v1.18.0/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs=
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
Expand Down
4 changes: 1 addition & 3 deletions pkg/builder/builder_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"testing"

. "github.com/onsi/ginkgo/v2"
"github.com/onsi/ginkgo/v2/reporters"
. "github.com/onsi/gomega"
apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
"k8s.io/apimachinery/pkg/api/meta"
Expand Down Expand Up @@ -78,8 +77,7 @@ var _ = AfterSuite(func() {
})

var _ = ReportAfterSuite("Report to Prow", func(report Report) {
reporters.ReportViaDeprecatedReporter(printer.NewlineReporter{}, report) //nolint // For migration of custom reporter check https://onsi.github.io/ginkgo/MIGRATING_TO_V2#migration-strategy-2
reporters.ReportViaDeprecatedReporter(printer.NewProwReporter(suiteName), report) //nolint // For migration of custom reporter check https://onsi.github.io/ginkgo/MIGRATING_TO_V2#migration-strategy-2
printer.AddReport(report, suiteName)
})

func addCRDToEnvironment(env *envtest.Environment, gvks ...schema.GroupVersionKind) {
Expand Down
1 change: 0 additions & 1 deletion pkg/builder/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,6 @@ func doReconcileTest(ctx context.Context, nameSuffix string, mgr manager.Manager
go func() {
defer GinkgoRecover()
Expect(mgr.Start(ctx)).NotTo(HaveOccurred())
By("Stopping the application")
}()

By("Creating a Deployment")
Expand Down
4 changes: 1 addition & 3 deletions pkg/cache/cache_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"testing"

. "github.com/onsi/ginkgo/v2"
"github.com/onsi/ginkgo/v2/reporters"
. "github.com/onsi/gomega"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
Expand Down Expand Up @@ -59,6 +58,5 @@ var _ = AfterSuite(func() {
})

var _ = ReportAfterSuite("Report to Prow", func(report Report) {
reporters.ReportViaDeprecatedReporter(printer.NewlineReporter{}, report) //nolint // For migration of custom reporter check https://onsi.github.io/ginkgo/MIGRATING_TO_V2#migration-strategy-2
reporters.ReportViaDeprecatedReporter(printer.NewProwReporter(suiteName), report) //nolint // For migration of custom reporter check https://onsi.github.io/ginkgo/MIGRATING_TO_V2#migration-strategy-2
printer.AddReport(report, suiteName)
})
4 changes: 1 addition & 3 deletions pkg/cache/internal/internal_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"testing"

. "github.com/onsi/ginkgo/v2"
"github.com/onsi/ginkgo/v2/reporters"
. "github.com/onsi/gomega"
"sigs.k8s.io/controller-runtime/pkg/envtest/printer"
)
Expand All @@ -33,6 +32,5 @@ func TestSource(t *testing.T) {
}

var _ = ReportAfterSuite("Report to Prow", func(report Report) {
reporters.ReportViaDeprecatedReporter(printer.NewlineReporter{}, report) //nolint // For migration of custom reporter check https://onsi.github.io/ginkgo/MIGRATING_TO_V2#migration-strategy-2
reporters.ReportViaDeprecatedReporter(printer.NewProwReporter(suiteName), report) //nolint // For migration of custom reporter check https://onsi.github.io/ginkgo/MIGRATING_TO_V2#migration-strategy-2
printer.AddReport(report, suiteName)
})
4 changes: 1 addition & 3 deletions pkg/certwatcher/certwatcher_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"testing"

. "github.com/onsi/ginkgo/v2"
"github.com/onsi/ginkgo/v2/reporters"
. "github.com/onsi/gomega"
"sigs.k8s.io/controller-runtime/pkg/envtest/printer"
logf "sigs.k8s.io/controller-runtime/pkg/log"
Expand Down Expand Up @@ -50,6 +49,5 @@ var _ = AfterSuite(func() {
})

var _ = ReportAfterSuite("Report to Prow", func(report Report) {
reporters.ReportViaDeprecatedReporter(printer.NewlineReporter{}, report) //nolint // For migration of custom reporter check https://onsi.github.io/ginkgo/MIGRATING_TO_V2#migration-strategy-2
reporters.ReportViaDeprecatedReporter(printer.NewProwReporter(suiteName), report) //nolint // For migration of custom reporter check https://onsi.github.io/ginkgo/MIGRATING_TO_V2#migration-strategy-2
printer.AddReport(report, suiteName)
})
4 changes: 1 addition & 3 deletions pkg/client/apiutil/apiutil_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"testing"

. "github.com/onsi/ginkgo/v2"
"github.com/onsi/ginkgo/v2/reporters"
. "github.com/onsi/gomega"
"k8s.io/client-go/rest"
"sigs.k8s.io/controller-runtime/pkg/envtest/printer"
Expand All @@ -46,6 +45,5 @@ var _ = BeforeSuite(func() {
})

var _ = ReportAfterSuite("Report to Prow", func(report Report) {
reporters.ReportViaDeprecatedReporter(printer.NewlineReporter{}, report) //nolint // For migration of custom reporter check https://onsi.github.io/ginkgo/MIGRATING_TO_V2#migration-strategy-2
reporters.ReportViaDeprecatedReporter(printer.NewProwReporter(suiteName), report) //nolint // For migration of custom reporter check https://onsi.github.io/ginkgo/MIGRATING_TO_V2#migration-strategy-2
printer.AddReport(report, suiteName)
})
4 changes: 1 addition & 3 deletions pkg/client/client_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"testing"

. "github.com/onsi/ginkgo/v2"
"github.com/onsi/ginkgo/v2/reporters"
. "github.com/onsi/gomega"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/kubernetes/scheme"
Expand Down Expand Up @@ -64,6 +63,5 @@ var _ = AfterSuite(func() {
})

var _ = ReportAfterSuite("Report to Prow", func(report Report) {
reporters.ReportViaDeprecatedReporter(printer.NewlineReporter{}, report) //nolint // For migration of custom reporter check https://onsi.github.io/ginkgo/MIGRATING_TO_V2#migration-strategy-2
reporters.ReportViaDeprecatedReporter(printer.NewProwReporter(suiteName), report) //nolint // For migration of custom reporter check https://onsi.github.io/ginkgo/MIGRATING_TO_V2#migration-strategy-2
printer.AddReport(report, suiteName)
})
4 changes: 1 addition & 3 deletions pkg/client/config/config_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"testing"

. "github.com/onsi/ginkgo/v2"
"github.com/onsi/ginkgo/v2/reporters"
. "github.com/onsi/gomega"

"sigs.k8s.io/controller-runtime/pkg/envtest/printer"
Expand All @@ -40,6 +39,5 @@ var _ = BeforeSuite(func() {
})

var _ = ReportAfterSuite("Report to Prow", func(report Report) {
reporters.ReportViaDeprecatedReporter(printer.NewlineReporter{}, report) //nolint // For migration of custom reporter check https://onsi.github.io/ginkgo/MIGRATING_TO_V2#migration-strategy-2
reporters.ReportViaDeprecatedReporter(printer.NewProwReporter(suiteName), report) //nolint // For migration of custom reporter check https://onsi.github.io/ginkgo/MIGRATING_TO_V2#migration-strategy-2
printer.AddReport(report, suiteName)
})
4 changes: 1 addition & 3 deletions pkg/client/fake/client_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"testing"

. "github.com/onsi/ginkgo/v2"
"github.com/onsi/ginkgo/v2/reporters"
. "github.com/onsi/gomega"
"sigs.k8s.io/controller-runtime/pkg/envtest/printer"

Expand All @@ -40,6 +39,5 @@ var _ = BeforeSuite(func() {
})

var _ = ReportAfterSuite("Report to Prow", func(report Report) {
reporters.ReportViaDeprecatedReporter(printer.NewlineReporter{}, report) //nolint // For migration of custom reporter check https://onsi.github.io/ginkgo/MIGRATING_TO_V2#migration-strategy-2
reporters.ReportViaDeprecatedReporter(printer.NewProwReporter(suiteName), report) //nolint // For migration of custom reporter check https://onsi.github.io/ginkgo/MIGRATING_TO_V2#migration-strategy-2
printer.AddReport(report, suiteName)
})
4 changes: 1 addition & 3 deletions pkg/cluster/cluster_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"testing"

. "github.com/onsi/ginkgo/v2"
"github.com/onsi/ginkgo/v2/reporters"
. "github.com/onsi/gomega"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
Expand Down Expand Up @@ -72,6 +71,5 @@ var _ = AfterSuite(func() {
})

var _ = ReportAfterSuite("Report to Prow", func(report Report) {
reporters.ReportViaDeprecatedReporter(printer.NewlineReporter{}, report) //nolint // For migration of custom reporter check https://onsi.github.io/ginkgo/MIGRATING_TO_V2#migration-strategy-2
reporters.ReportViaDeprecatedReporter(printer.NewProwReporter(suiteName), report) //nolint // For migration of custom reporter check https://onsi.github.io/ginkgo/MIGRATING_TO_V2#migration-strategy-2
printer.AddReport(report, suiteName)
})
4 changes: 1 addition & 3 deletions pkg/config/config_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"testing"

. "github.com/onsi/ginkgo/v2"
"github.com/onsi/ginkgo/v2/reporters"
. "github.com/onsi/gomega"

"sigs.k8s.io/controller-runtime/pkg/envtest/printer"
Expand All @@ -34,6 +33,5 @@ func TestScheme(t *testing.T) {
}

var _ = ReportAfterSuite("Report to Prow", func(report Report) {
reporters.ReportViaDeprecatedReporter(printer.NewlineReporter{}, report) //nolint // For migration of custom reporter check https://onsi.github.io/ginkgo/MIGRATING_TO_V2#migration-strategy-2
reporters.ReportViaDeprecatedReporter(printer.NewProwReporter(suiteName), report) //nolint // For migration of custom reporter check https://onsi.github.io/ginkgo/MIGRATING_TO_V2#migration-strategy-2
printer.AddReport(report, suiteName)
})
4 changes: 1 addition & 3 deletions pkg/controller/controller_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"testing"

. "github.com/onsi/ginkgo/v2"
"github.com/onsi/ginkgo/v2/reporters"
. "github.com/onsi/gomega"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/client-go/kubernetes"
Expand Down Expand Up @@ -94,6 +93,5 @@ var _ = AfterSuite(func() {
})

var _ = ReportAfterSuite("Report to Prow", func(report Report) {
reporters.ReportViaDeprecatedReporter(printer.NewlineReporter{}, report) //nolint // For migration of custom reporter check https://onsi.github.io/ginkgo/MIGRATING_TO_V2#migration-strategy-2
reporters.ReportViaDeprecatedReporter(printer.NewProwReporter(suiteName), report) //nolint // For migration of custom reporter check https://onsi.github.io/ginkgo/MIGRATING_TO_V2#migration-strategy-2
printer.AddReport(report, suiteName)
})
4 changes: 1 addition & 3 deletions pkg/controller/controllerutil/controllerutil_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"testing"

. "github.com/onsi/ginkgo/v2"
"github.com/onsi/ginkgo/v2/reporters"
. "github.com/onsi/gomega"

"k8s.io/client-go/rest"
Expand Down Expand Up @@ -57,6 +56,5 @@ var _ = AfterSuite(func() {
})

var _ = ReportAfterSuite("Report to Prow", func(report Report) {
reporters.ReportViaDeprecatedReporter(printer.NewlineReporter{}, report) //nolint // For migration of custom reporter check https://onsi.github.io/ginkgo/MIGRATING_TO_V2#migration-strategy-2
reporters.ReportViaDeprecatedReporter(printer.NewProwReporter(suiteName), report) //nolint // For migration of custom reporter check https://onsi.github.io/ginkgo/MIGRATING_TO_V2#migration-strategy-2
printer.AddReport(report, suiteName)
})
4 changes: 1 addition & 3 deletions pkg/envtest/envtest_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"testing"

. "github.com/onsi/ginkgo/v2"
"github.com/onsi/ginkgo/v2/reporters"
. "github.com/onsi/gomega"
admissionv1 "k8s.io/api/admissionregistration/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -138,6 +137,5 @@ var _ = AfterSuite(func() {
})

var _ = ReportAfterSuite("Report to Prow", func(report Report) {
reporters.ReportViaDeprecatedReporter(printer.NewlineReporter{}, report) //nolint // For migration of custom reporter check https://onsi.github.io/ginkgo/MIGRATING_TO_V2#migration-strategy-2
reporters.ReportViaDeprecatedReporter(printer.NewProwReporter(suiteName), report) //nolint // For migration of custom reporter check https://onsi.github.io/ginkgo/MIGRATING_TO_V2#migration-strategy-2
printer.AddReport(report, suiteName)
})
27 changes: 0 additions & 27 deletions pkg/envtest/ginkgo_test.go

This file was deleted.

52 changes: 0 additions & 52 deletions pkg/envtest/printer/ginkgo.go

This file was deleted.

Loading

0 comments on commit beb43d9

Please sign in to comment.