mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
rebase: update github.com/onsi/ginkgo to v2.9.5
There was a `replace` statement in `go.mod` that prevented Ginkgo from updating. Kubernetes 1.27 requires a new Ginkgo version. Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
committed by
mergify[bot]
parent
b1a4590967
commit
6709cdd1d0
112
vendor/github.com/onsi/ginkgo/v2/internal/testingtproxy/testing_t_proxy.go
generated
vendored
112
vendor/github.com/onsi/ginkgo/v2/internal/testingtproxy/testing_t_proxy.go
generated
vendored
@ -5,35 +5,63 @@ import (
|
||||
"io"
|
||||
"os"
|
||||
|
||||
"github.com/onsi/ginkgo/v2/formatter"
|
||||
"github.com/onsi/ginkgo/v2/internal"
|
||||
"github.com/onsi/ginkgo/v2/reporters"
|
||||
"github.com/onsi/ginkgo/v2/types"
|
||||
)
|
||||
|
||||
type failFunc func(message string, callerSkip ...int)
|
||||
type skipFunc func(message string, callerSkip ...int)
|
||||
type cleanupFunc func(args ...interface{})
|
||||
type cleanupFunc func(args ...any)
|
||||
type reportFunc func() types.SpecReport
|
||||
type addReportEntryFunc func(names string, args ...any)
|
||||
type ginkgoWriterInterface interface {
|
||||
io.Writer
|
||||
|
||||
func New(writer io.Writer, fail failFunc, skip skipFunc, cleanup cleanupFunc, report reportFunc, offset int) *ginkgoTestingTProxy {
|
||||
Print(a ...interface{})
|
||||
Printf(format string, a ...interface{})
|
||||
Println(a ...interface{})
|
||||
}
|
||||
type ginkgoRecoverFunc func()
|
||||
type attachProgressReporterFunc func(func() string) func()
|
||||
|
||||
func New(writer ginkgoWriterInterface, fail failFunc, skip skipFunc, cleanup cleanupFunc, report reportFunc, addReportEntry addReportEntryFunc, ginkgoRecover ginkgoRecoverFunc, attachProgressReporter attachProgressReporterFunc, randomSeed int64, parallelProcess int, parallelTotal int, noColor bool, offset int) *ginkgoTestingTProxy {
|
||||
return &ginkgoTestingTProxy{
|
||||
fail: fail,
|
||||
offset: offset,
|
||||
writer: writer,
|
||||
skip: skip,
|
||||
cleanup: cleanup,
|
||||
report: report,
|
||||
fail: fail,
|
||||
offset: offset,
|
||||
writer: writer,
|
||||
skip: skip,
|
||||
cleanup: cleanup,
|
||||
report: report,
|
||||
addReportEntry: addReportEntry,
|
||||
ginkgoRecover: ginkgoRecover,
|
||||
attachProgressReporter: attachProgressReporter,
|
||||
randomSeed: randomSeed,
|
||||
parallelProcess: parallelProcess,
|
||||
parallelTotal: parallelTotal,
|
||||
f: formatter.NewWithNoColorBool(noColor),
|
||||
}
|
||||
}
|
||||
|
||||
type ginkgoTestingTProxy struct {
|
||||
fail failFunc
|
||||
skip skipFunc
|
||||
cleanup cleanupFunc
|
||||
report reportFunc
|
||||
offset int
|
||||
writer io.Writer
|
||||
fail failFunc
|
||||
skip skipFunc
|
||||
cleanup cleanupFunc
|
||||
report reportFunc
|
||||
offset int
|
||||
writer ginkgoWriterInterface
|
||||
addReportEntry addReportEntryFunc
|
||||
ginkgoRecover ginkgoRecoverFunc
|
||||
attachProgressReporter attachProgressReporterFunc
|
||||
randomSeed int64
|
||||
parallelProcess int
|
||||
parallelTotal int
|
||||
f formatter.Formatter
|
||||
}
|
||||
|
||||
// basic testing.T support
|
||||
|
||||
func (t *ginkgoTestingTProxy) Cleanup(f func()) {
|
||||
t.cleanup(f, internal.Offset(1))
|
||||
}
|
||||
@ -81,7 +109,7 @@ func (t *ginkgoTestingTProxy) Fatalf(format string, args ...interface{}) {
|
||||
}
|
||||
|
||||
func (t *ginkgoTestingTProxy) Helper() {
|
||||
// No-op
|
||||
types.MarkAsHelper(1)
|
||||
}
|
||||
|
||||
func (t *ginkgoTestingTProxy) Log(args ...interface{}) {
|
||||
@ -126,3 +154,57 @@ func (t *ginkgoTestingTProxy) TempDir() string {
|
||||
|
||||
return tmpDir
|
||||
}
|
||||
|
||||
// FullGinkgoTInterface
|
||||
func (t *ginkgoTestingTProxy) AddReportEntryVisibilityAlways(name string, args ...any) {
|
||||
finalArgs := []any{internal.Offset(1), types.ReportEntryVisibilityAlways}
|
||||
t.addReportEntry(name, append(finalArgs, args...)...)
|
||||
}
|
||||
func (t *ginkgoTestingTProxy) AddReportEntryVisibilityFailureOrVerbose(name string, args ...any) {
|
||||
finalArgs := []any{internal.Offset(1), types.ReportEntryVisibilityFailureOrVerbose}
|
||||
t.addReportEntry(name, append(finalArgs, args...)...)
|
||||
}
|
||||
func (t *ginkgoTestingTProxy) AddReportEntryVisibilityNever(name string, args ...any) {
|
||||
finalArgs := []any{internal.Offset(1), types.ReportEntryVisibilityNever}
|
||||
t.addReportEntry(name, append(finalArgs, args...)...)
|
||||
}
|
||||
func (t *ginkgoTestingTProxy) Print(a ...any) {
|
||||
t.writer.Print(a...)
|
||||
}
|
||||
func (t *ginkgoTestingTProxy) Printf(format string, a ...any) {
|
||||
t.writer.Printf(format, a...)
|
||||
}
|
||||
func (t *ginkgoTestingTProxy) Println(a ...any) {
|
||||
t.writer.Println(a...)
|
||||
}
|
||||
func (t *ginkgoTestingTProxy) F(format string, args ...any) string {
|
||||
return t.f.F(format, args...)
|
||||
}
|
||||
func (t *ginkgoTestingTProxy) Fi(indentation uint, format string, args ...any) string {
|
||||
return t.f.Fi(indentation, format, args...)
|
||||
}
|
||||
func (t *ginkgoTestingTProxy) Fiw(indentation uint, maxWidth uint, format string, args ...any) string {
|
||||
return t.f.Fiw(indentation, maxWidth, format, args...)
|
||||
}
|
||||
func (t *ginkgoTestingTProxy) RenderTimeline() string {
|
||||
return reporters.RenderTimeline(t.report(), false)
|
||||
}
|
||||
func (t *ginkgoTestingTProxy) GinkgoRecover() {
|
||||
t.ginkgoRecover()
|
||||
}
|
||||
func (t *ginkgoTestingTProxy) DeferCleanup(args ...any) {
|
||||
finalArgs := []any{internal.Offset(1)}
|
||||
t.cleanup(append(finalArgs, args...)...)
|
||||
}
|
||||
func (t *ginkgoTestingTProxy) RandomSeed() int64 {
|
||||
return t.randomSeed
|
||||
}
|
||||
func (t *ginkgoTestingTProxy) ParallelProcess() int {
|
||||
return t.parallelProcess
|
||||
}
|
||||
func (t *ginkgoTestingTProxy) ParallelTotal() int {
|
||||
return t.parallelTotal
|
||||
}
|
||||
func (t *ginkgoTestingTProxy) AttachProgressReporter(f func() string) func() {
|
||||
return t.attachProgressReporter(f)
|
||||
}
|
||||
|
Reference in New Issue
Block a user